fix appveyor build for es6

This commit is contained in:
Eric Vergnaud 2020-10-10 23:34:27 +08:00
parent 6ee7e0c21c
commit 8c4c47d999
2 changed files with 6 additions and 16 deletions

View File

@ -101,7 +101,7 @@ public abstract class BaseRuntimeTest {
}
public boolean checkIgnored() {
boolean ignored = TestContext.isUnsupportedTarget(descriptor.getTarget()) || descriptor.ignore(descriptor.getTarget());
boolean ignored = !TestContext.isSupportedTarget(descriptor.getTarget()) || descriptor.ignore(descriptor.getTarget());
if(ignored)
System.out.println("Ignore " + descriptor);
return ignored;

View File

@ -3,27 +3,17 @@ package org.antlr.v4.test.runtime;
public abstract class TestContext {
public static boolean isTravisCI() {
String value = System.getenv("TRAVIS");
if(value==null)
return false;
else
return "true".equals(value.toLowerCase());
return "true".equals(String.valueOf(System.getenv("TRAVIS")).toLowerCase());
}
public static boolean isAppVeyorCI() {
System.out.println(System.getenv("APPVEYOR"));
String value = System.getenv("APPVEYOR");
if(value==null)
return false;
else
return "true".equals(value.toLowerCase());
return "true".equals(String.valueOf(System.getenv("APPVEYOR")).toLowerCase());
}
public static boolean isUnsupportedTarget(String target) {
public static boolean isSupportedTarget(String target) {
if(isAppVeyorCI())
return !"CSharp".equals(target);
// return target.matches("Cpp|Node");
return !target.matches("Cpp|Swift|Node");
else
return false;
return true;
}
}