diff --git a/headless/Compare.cpp b/headless/Compare.cpp index 8036090001..1be2f0fef5 100644 --- a/headless/Compare.cpp +++ b/headless/Compare.cpp @@ -49,7 +49,7 @@ void TeamCityPrint(const char *fmt, ...) temp[TEMP_BUFFER_SIZE - 1] = '\0'; va_end(args); - printf("%s", temp); + printf("##teamcity[%s]\n", temp); } struct BufferedLineReader { @@ -223,7 +223,7 @@ bool CompareOutput(const std::string &bootFilename, const std::string &output, b if (!failed) { - TeamCityPrint("##teamcity[testFailed name='%s' message='Output different from expected file']\n", teamCityName.c_str()); + TeamCityPrint("testFailed name='%s' message='Output different from expected file'", teamCityName.c_str()); failed = true; } @@ -277,7 +277,7 @@ bool CompareOutput(const std::string &bootFilename, const std::string &output, b else { fprintf(stderr, "Expectation file %s not found\n", expect_filename.c_str()); - TeamCityPrint("##teamcity[testIgnored name='%s' message='Expects file missing']\n", teamCityName.c_str()); + TeamCityPrint("testIgnored name='%s' message='Expects file missing'", teamCityName.c_str()); return false; } } diff --git a/headless/Headless.cpp b/headless/Headless.cpp index 1dc70e488d..67c4ef15a8 100644 --- a/headless/Headless.cpp +++ b/headless/Headless.cpp @@ -161,11 +161,11 @@ bool RunAutoTest(HeadlessHost *headlessHost, CoreParameter &coreParameter, bool if (!PSP_Init(coreParameter, &error_string)) { fprintf(stderr, "Failed to start %s. Error: %s\n", coreParameter.fileToStart.c_str(), error_string.c_str()); printf("TESTERROR\n"); - TeamCityPrint("##teamcity[testIgnored name='%s' message='PRX/ELF missing']\n", teamCityName.c_str()); + TeamCityPrint("testIgnored name='%s' message='PRX/ELF missing'", teamCityName.c_str()); return false; } - TeamCityPrint("##teamcity[testStarted name='%s' captureStandardOutput='true']\n", teamCityName.c_str()); + TeamCityPrint("testStarted name='%s' captureStandardOutput='true'", teamCityName.c_str()); host->BootDone(); @@ -201,7 +201,7 @@ bool RunAutoTest(HeadlessHost *headlessHost, CoreParameter &coreParameter, bool passed = false; host->SendDebugOutput("TIMEOUT\n"); - TeamCityPrint("##teamcity[testFailed name='%s' message='Test timeout']\n", teamCityName.c_str()); + TeamCityPrint("testFailed name='%s' message='Test timeout'", teamCityName.c_str()); Core_Stop(); } } @@ -217,7 +217,7 @@ bool RunAutoTest(HeadlessHost *headlessHost, CoreParameter &coreParameter, bool if (autoCompare && passed) passed = CompareOutput(coreParameter.fileToStart, output, verbose); - TeamCityPrint("##teamcity[testFinished name='%s']\n", teamCityName.c_str()); + TeamCityPrint("testFinished name='%s'", teamCityName.c_str()); return passed; } diff --git a/test.py b/test.py index bf22ff7280..fddbda057c 100755 --- a/test.py +++ b/test.py @@ -21,12 +21,14 @@ PPSSPP_EXECUTABLES = [ "build*/MinSizeRel/PPSSPPHeadless", # Linux "build*/PPSSPPHeadless", - "./PPSSPPHeadless" + "./PPSSPPHeadless", + # CI + "ppsspp/PPSSPPHeadless", + "ppsspp\\PPSSPPHeadless.exe", ] PPSSPP_EXE = None TEST_ROOT = "pspautotests/tests/" -teamcity_mode = False TIMEOUT = 5 class Command(object): @@ -369,11 +371,6 @@ def init(): print("PPSSPPHeadless executable missing, please build one.") sys.exit(1) -def tcprint(arg): - global teamcity_mode - if teamcity_mode: - print(arg) - def run_tests(test_list, args): global PPSSPP_EXE, TIMEOUT tests_passed = [] @@ -401,13 +398,11 @@ def run_tests(test_list, args): def main(): - global teamcity_mode init() tests = [] args = [] for arg in sys.argv[1:]: if arg == '--teamcity': - teamcity_mode = True args.append(arg) elif arg[0] == '-': args.append(arg)