Run Android-mode Go xlang tests with javac static serializer generation enabled.
()
| 204 | |
| 205 | |
| 206 | def run_android_go_xlang_static_processor(): |
| 207 | """Run Android-mode Go xlang tests with javac static serializer generation enabled.""" |
| 208 | root = common.PROJECT_ROOT_DIR |
| 209 | java_dir = os.path.join(root, "java") |
| 210 | core_dir = os.path.join(java_dir, "fory-core") |
| 211 | core_pom = os.path.join(core_dir, "pom.xml") |
| 212 | idl_java_dir = os.path.join(root, "integration_tests", "idl_tests", "java") |
| 213 | idl_java_pom = os.path.join(idl_java_dir, "pom.xml") |
| 214 | temp_core_pom = None |
| 215 | temp_idl_java_pom = None |
| 216 | try: |
| 217 | temp_core_pom = _copy_pom_with_annotation_processor(core_pom) |
| 218 | temp_idl_java_pom = _copy_pom_with_annotation_processor(idl_java_pom) |
| 219 | os.environ.setdefault("FORY_ANDROID_ENABLED", "1") |
| 220 | os.environ.setdefault("FORY_GO_JAVA_CI", "1") |
| 221 | os.environ.setdefault("FORY_STATIC_PROCESSOR_CI", "1") |
| 222 | os.environ.setdefault("ENABLE_FORY_DEBUG_OUTPUT", "1") |
| 223 | _exec_cmd( |
| 224 | "mvn -T16 --no-transfer-progress clean install -DskipTests " |
| 225 | "-Dmaven.javadoc.skip=true -Dmaven.source.skip=true " |
| 226 | "-pl fory-core,fory-annotation-processor -am", |
| 227 | java_dir, |
| 228 | ) |
| 229 | _exec_cmd( |
| 230 | "mvn -T16 --no-transfer-progress " |
| 231 | f"-f {shlex.quote(temp_core_pom)} " |
| 232 | "clean test -Dtest=org.apache.fory.xlang.GoXlangTest", |
| 233 | core_dir, |
| 234 | ) |
| 235 | env = os.environ.copy() |
| 236 | env["IDL_JAVA_POM"] = temp_idl_java_pom |
| 237 | logging.info( |
| 238 | f"running command in {root}: ./integration_tests/idl_tests/run_go_tests.sh" |
| 239 | ) |
| 240 | subprocess.check_call( |
| 241 | ["./integration_tests/idl_tests/run_go_tests.sh"], cwd=root, env=env |
| 242 | ) |
| 243 | finally: |
| 244 | _remove_file(temp_core_pom) |
| 245 | _remove_file(temp_idl_java_pom) |
| 246 | |
| 247 | |
| 248 | def parse_args(): |
nothing calls this directly
no test coverage detected