[mono-symbolicate] Skip AOT tests if AOT isn't supported by the current arch
[mono.git] / mcs / tools / mono-symbolicate / Makefile
index 7e14ab8a62fe7e42a917c0be74fd0e5417a5c793..c9c10608bff4d7d29abf3ffb3e7651afe2b2d4e8 100644 (file)
@@ -39,10 +39,15 @@ BUILD_TEST_EXE = @\
        mkdir -p $(OUT_DIR); \
        $(MCS) -debug $(TEST_CS) -out:$(TEST_EXE)
 
-check: all
+check: test-local
+
+AOT_SUPPORTED = $(shell $(MONO) --aot 2>&1 | grep -q "AOT compilation is not supported" && echo 0 || echo 1)
+
+test-local: all
        $(BUILD_TEST_EXE)
        @echo "Checking $(PROGRAM) without AOT"
        $(CHECK_DIFF)
+ifeq ($(AOT_SUPPORTED), 1)
        @echo "Checking $(PROGRAM) with AOT"
        @MONO_DEBUG=gen-compact-seq-points $(MONO) --aot $(TEST_EXE) > /dev/null
        $(CHECK_DIFF)
@@ -50,3 +55,4 @@ check: all
        $(BUILD_TEST_EXE)
        @MONO_DEBUG=gen-compact-seq-points $(MONO) --aot=gen-seq-points-file $(TEST_EXE) > /dev/null
        $(CHECK_DIFF)
+endif