Skip to content

Commit

Permalink
ofxUnitTests: only try to run appveyor log if platform == win
Browse files Browse the repository at this point in the history
  • Loading branch information
arturoc committed Sep 13, 2016
1 parent fde06f6 commit 92ccd50
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion addons/ofxUnitTests/src/ofxUnitTests.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down Expand Up @@ -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)!=""){
Expand Down Expand Up @@ -288,6 +291,7 @@ class ofxUnitTestsApp: public ofBaseApp{
return true;
}
}
#endif

int numTestsTotal = 0;
int numTestsPassed = 0;
Expand Down

0 comments on commit 92ccd50

Please sign in to comment.