comparison data/fileio/test/svcore-data-fileio-test.cpp @ 1607:a77fc6da288b

Try to avoid interference with QtTest's own arg handling
author Chris Cannam
date Mon, 18 Feb 2019 11:37:41 +0000
parents a090221caeda
children dbd13eb7dad1
comparison
equal deleted inserted replaced
1606:4a7ebaaf9f53 1607:a77fc6da288b
37 // incredible to have to hardcode this, but I just can't figure out how to 37 // incredible to have to hardcode this, but I just can't figure out how to
38 // get QMAKE_POST_LINK to add an arg to its command successfully on Windows 38 // get QMAKE_POST_LINK to add an arg to its command successfully on Windows
39 testDir = "../sonic-visualiser/svcore/data/fileio/test"; 39 testDir = "../sonic-visualiser/svcore/data/fileio/test";
40 #endif 40 #endif
41 41
42 if (argc > 1) {
43 testDir = argv[1];
44 }
45
46 QCoreApplication app(argc, argv); 42 QCoreApplication app(argc, argv);
47 app.setOrganizationName("sonic-visualiser"); 43 app.setOrganizationName("sonic-visualiser");
48 app.setApplicationName("test-svcore-data-fileio"); 44 app.setApplicationName("test-svcore-data-fileio");
45
46 if (argc == 3 && string(argv[1]) == "--testdir") {
47 testDir = argv[2];
48 argc = 1;
49 }
49 50
50 if (testDir != "") { 51 if (testDir != "") {
51 SVCERR << "Setting test directory base path to \"" << testDir << "\"" << endl; 52 SVCERR << "Setting test directory base path to \"" << testDir << "\"" << endl;
52 } 53 }
53 54