Lines Matching defs:mode
357 TestMode mode;
359 HidlEnvironment(TestMode mode, bool enableDelayMeasurementTests) :
360 mode(mode), enableDelayMeasurementTests(enableDelayMeasurementTests) {};
379 // getStub is true if we are in passthrough mode to skip checking
380 // binderized server, false for binderized mode.
382 memoryTest = IMemoryTest::getService("memory", mode == PASSTHROUGH /* getStub */);
384 ASSERT_EQ(memoryTest->isRemote(), mode == BINDERIZED);
386 fetcher = IFetcher::getService("fetcher", mode == PASSTHROUGH /* getStub */);
388 ASSERT_EQ(fetcher->isRemote(), mode == BINDERIZED);
390 foo = IFoo::getService("foo", mode == PASSTHROUGH /* getStub */);
392 ASSERT_EQ(foo->isRemote(), mode == BINDERIZED);
394 dyingBaz = IBaz::getService("dyingBaz", mode == PASSTHROUGH /* getStub */);
396 ASSERT_EQ(foo->isRemote(), mode == BINDERIZED);
398 bar = IBar::getService("foo", mode == PASSTHROUGH /* getStub */);
400 ASSERT_EQ(bar->isRemote(), mode == BINDERIZED);
402 graphInterface = IGraph::getService("graph", mode == PASSTHROUGH /* getStub */);
404 ASSERT_EQ(graphInterface->isRemote(), mode == BINDERIZED);
406 pointerInterface = IPointer::getService("pointer", mode == PASSTHROUGH /* getStub */);
408 ASSERT_EQ(pointerInterface->isRemote(), mode == BINDERIZED);
410 // use passthrough mode as the validation object.
435 TestMode mode = TestMode::PASSTHROUGH;
450 mode = gHidlEnvironment->mode;
528 auto service = IHash::getService(mode == PASSTHROUGH /* getStub */);
560 switch(mode) {
569 EXPECT_TRUE(false) << "unrecognized mode";
590 if (mode == BINDERIZED) {
614 if (mode == BINDERIZED) {
623 if (mode == BINDERIZED) {
653 if (mode == BINDERIZED) {
847 EXPECT_EQ(desc, mode == BINDERIZED
848 ? IBar::descriptor // service is actually IBar in binderized mode
1393 if (mode != BINDERIZED) {
1573 if (mode == BINDERIZED) {
1880 int forkAndRunTests(TestMode mode, bool enableDelayMeasurementTests) {
1884 const char* modeText = (mode == BINDERIZED) ? "BINDERIZED" : "PASSTHROUGH";
1885 ALOGI("Start running tests in %s mode...", modeText);
1886 fprintf(stdout, "Start running tests in %s mode...\n", modeText);
1892 mode, enableDelayMeasurementTests)));
1904 ALOGI("All tests finished in %s mode.", modeText);
1905 fprintf(stdout, "All tests finished in %s mode.\n", modeText);
1910 void handleStatus(int status, const char *mode) {
1915 fprintf(stdout, " RUN_ALL_TESTS returns %d for %s mode.\n", -status, mode);
1917 fprintf(stdout, " %d test(s) failed for %s mode.\n", status, mode);
1920 fprintf(stdout, " ERROR: %s child process exited abnormally with %d\n", mode, status);
1930 fprintf(stderr, " -b binderized mode only\n");
1931 fprintf(stderr, " -p passthrough mode only\n");