@@ -43,8 +43,17 @@ def _conformance_test_args(data, skip_tests):
4343 args .append ("-Ddev.cel.conformance.ConformanceTests.tests={}" .format ("," .join (["$(location " + test + ")" for test in data ])))
4444 return args
4545
46- def conformance_test (name , data , dashboard , skip_tests = []):
47- if dashboard :
46+ Mode = struct (
47+ # Standard test execution against HEAD
48+ TEST = "test" ,
49+ # Executes conformance test against published jar in maven central
50+ MAVEN_TEST = "maven_test" ,
51+ # Dashboard mode
52+ DASHBOARD = "dashboard" ,
53+ )
54+
55+ def conformance_test (name , data , mode = Mode .TEST , skip_tests = []):
56+ if mode == Mode .DASHBOARD :
4857 java_test (
4958 name = "_" + name ,
5059 jvm_flags = _conformance_test_args (data , skip_tests ),
@@ -57,6 +66,7 @@ def conformance_test(name, data, dashboard, skip_tests = []):
5766 "notap" ,
5867 ],
5968 )
69+
6070 native .sh_test (
6171 name = name ,
6272 size = "small" ,
@@ -69,7 +79,8 @@ def conformance_test(name, data, dashboard, skip_tests = []):
6979 "notap" ,
7080 ],
7181 )
72- else :
82+ elif mode == Mode .TEST :
83+ # In standard test mode, just create the java_test.
7384 java_test (
7485 name = name ,
7586 jvm_flags = _conformance_test_args (data , skip_tests ),
@@ -78,3 +89,5 @@ def conformance_test(name, data, dashboard, skip_tests = []):
7889 test_class = "dev.cel.conformance.ConformanceTests" ,
7990 runtime_deps = ["//conformance/src/test/java/dev/cel/conformance:run" ],
8091 )
92+ else :
93+ fail ("Unknown mode specified: %s." % mode )
0 commit comments