Skip to content

Commit

Permalink
OboeTester: fix skip count display near top of screen (#2151)
Browse files Browse the repository at this point in the history
Was +1 because it was being calculated based on variables
instead of direct counting.

See b/375050058
  • Loading branch information
philburk authored Feb 4, 2025
1 parent 71d6185 commit d256e32
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public class AutomatedTestRunner extends LinearLayout implements Runnable {
private int mTestCount;
private int mPassCount;
private int mFailCount;
private int mSkipCount;
private TestAudioActivity mActivity;

private Thread mAutoThread;
Expand Down Expand Up @@ -144,6 +145,9 @@ public void incrementFailCount() {
public void incrementPassCount() {
mPassCount++;
}
public void incrementSkipCount() {
mSkipCount++;
}
public void incrementTestCount() {
mTestCount++;
}
Expand Down Expand Up @@ -288,6 +292,7 @@ public void run() {
mTestCount = 0;
mPassCount = 0;
mFailCount = 0;
mSkipCount = 0;
try {
mActivity.runTest();
log("Tests finished.");
Expand Down Expand Up @@ -328,11 +333,9 @@ public void run() {

@NonNull
public String getPassFailReport() {
int skipped = mTestCount - (mPassCount + mFailCount);
String passFailReport = mPassCount + " passed. "
return mPassCount + " passed. "
+ mFailCount + " failed. "
+ skipped + " skipped. ";
return passFailReport;
+ mSkipCount + " skipped. ";
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ protected String getStreamText(AudioStreamBase stream) {
protected TestResult testCurrentConfigurations() throws InterruptedException {
mAutomatedTestRunner.incrementTestCount();
if ((getSingleTestIndex() >= 0) && (getTestCount() != getSingleTestIndex())) {
mAutomatedTestRunner.incrementSkipCount();
return null;
}

Expand Down Expand Up @@ -364,6 +365,7 @@ protected TestResult testCurrentConfigurations() throws InterruptedException {
mAutomatedTestRunner.incrementFailCount();
} else if (skipped) {
log(TEXT_SKIP + " - " + skipReason);
mAutomatedTestRunner.incrementSkipCount();
} else {
log("Result:");
reason += didTestFail();
Expand Down

0 comments on commit d256e32

Please sign in to comment.