From 92ccd508411e72b318b4f78fda4320143f727192 Mon Sep 17 00:00:00 2001 From: arturo castro Date: Tue, 13 Sep 2016 14:47:09 +0200 Subject: [PATCH] ofxUnitTests: only try to run appveyor log if platform == win --- addons/ofxUnitTests/src/ofxUnitTests.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/addons/ofxUnitTests/src/ofxUnitTests.h b/addons/ofxUnitTests/src/ofxUnitTests.h index 28633df61d0..c7dde371999 100644 --- a/addons/ofxUnitTests/src/ofxUnitTests.h +++ b/addons/ofxUnitTests/src/ofxUnitTests.h @@ -141,10 +141,12 @@ class ofxUnitTestsApp: public ofBaseApp{ ofLogError() << numTestsFailed << "/" << numTestsTotal << " tests failed"; } - ofLogNotice() << "took " << ofToString(durationMs) << "ms"; + ofLogNotice() << "took " << ofToString(durationMs) << "ms"; +#if defined(TARGET_WIN32) if(!reportAppVeyor(passed, durationMs)){ ++numTestsFailed; } +#endif ofExit(numTestsFailed); } @@ -244,6 +246,7 @@ class ofxUnitTestsApp: public ofBaseApp{ return "\"" + var + "\": \"" + value + "\""; } +#if defined(TARGET_WIN32) bool reportAppVeyor(bool passed, uint64_t durationMs){ const std::string APPVEYOR_API_URL = "APPVEYOR_API_URL"; if(ofGetEnv(APPVEYOR_API_URL)!=""){ @@ -288,6 +291,7 @@ class ofxUnitTestsApp: public ofBaseApp{ return true; } } +#endif int numTestsTotal = 0; int numTestsPassed = 0;