4 * Copyright (c) 2017 Samsung Electronics Co., Ltd.
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
22 #include "test_bench.h"
24 #define TEST_AUTO "auto"
26 class tester_auto : public tester {
28 tester_auto(const char *name);
29 virtual ~tester_auto();
31 bool setup(sensor_type_t type, int argc, char *argv[]);
34 bool run(int argc, char *argv[]);
38 tester_auto::tester_auto(const char *name)
43 tester_auto::~tester_auto()
47 bool tester_auto::setup(sensor_type_t type, int argc, char *argv[])
49 test_option::filter = "(?!manual|skip)[\\w\\.]+";
51 if (!test_option::set_options(argc, argv)) {
59 bool tester_auto::teardown(void)
64 bool tester_auto::run(int argc, char *argv[])
66 test_bench::run_all_testcases();
70 void tester_auto::usage(void)
72 _N("Usage : sensorctl test auto [--help] [--list] [--filter=<regex>]\n");
73 _N(" [--verbose] [--shuffle] [--repeat]\n");
77 _N(" sensorctl test auto --list\n");
78 _N(" sensorctl test auto --filter=accelerometer.interval*\n");
79 _N(" sensorctl test auto --filter=accelerometer.start\n");
80 _N(" sensorctl test auto --filter=accelerometer.verify\n");
81 _N(" sensorctl test auto --filter=ipc.socket*\n");
82 _N(" sensorctl test auto --shuffle\n");
83 _N(" sensorctl test auto --verbose\n");
84 _N(" sensorctl test auto --output=results.log\n");
87 REGISTER_TESTER(TEST_AUTO, tester_auto);