2 * Copyright (c) 2015 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 #include "default/DefaultTest.h"
19 #include "app-history/history.h"
20 #include "job-scheduler/JobSchedulerTest.h"
24 static void __signal_handler(int signo)
26 if (signo == SIGINT && is_mainloop_running()) {
27 g_print(PURPLE("\nskipping the testcase..."));
30 g_print(PURPLE("\nterminating... (SIGNAL %d)\n"), signo);
35 static void __print_usage()
37 g_print("Usage: context-test TESTSUITE\n\n");
38 g_print("TESTSUITE can be one of the followings:\n");
39 g_print(" a\t to test app-history\n");
40 g_print(" j\t to test job-scheduler\n");
43 int main(int argc, char** argv)
45 signal(SIGINT, __signal_handler);
46 signal(SIGHUP, __signal_handler);
47 signal(SIGTERM, __signal_handler);
48 signal(SIGQUIT, __signal_handler);
50 test_default(&argc, &argv);
60 return test_app_history(&argc, &argv);
62 return test_job_scheduler(&argc, &argv);