diff --git a/.travis.yml b/.travis.yml index a19e028..0d541e6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -310,10 +310,10 @@ script: if [ -z $SOURCE_CODE_CHECK ]; then cd build if [[ "$BUILD_TOOLCHAIN" =~ ^Visual\ Studio ]]; then - cmake --build . --config ${BUILD_TYPE} -- -nologo -v:minimal + cmake --build . --config ${BUILD_TYPE} -- -nologo -v:minimal || exit 1 cd ${BUILD_TYPE} else - cmake --build . + cmake --build . || exit 1 fi echo "" echo "=== Starting Tests ===" @@ -321,23 +321,23 @@ script: if [ "$USE_VALGRIND" = "1" ]; then RUN_CMD="valgrind --leak-check=full --show-reachable=yes --track-origins=yes" fi - eval "$RUN_CMD ./asmjit_test_unit --quick" + eval "$RUN_CMD ./asmjit_test_unit --quick" || exit 1 echo "" - eval "$RUN_CMD ./asmjit_test_opcode > /dev/null" + eval "$RUN_CMD ./asmjit_test_opcode > /dev/null" || exit 1 echo "" - eval "$RUN_CMD ./asmjit_test_x86_asm" + eval "$RUN_CMD ./asmjit_test_x86_asm" || exit 1 echo "" - eval "$RUN_CMD ./asmjit_test_x86_sections" + eval "$RUN_CMD ./asmjit_test_x86_sections" || exit 1 if [ -f ./asmjit_test_x86_instinfo ]; then echo "" - eval "$RUN_CMD ./asmjit_test_x86_instinfo" + eval "$RUN_CMD ./asmjit_test_x86_instinfo" || exit 1 fi if [ -f ./asmjit_test_x86_cc ]; then echo "" - eval "$RUN_CMD ./asmjit_test_x86_cc" + eval "$RUN_CMD ./asmjit_test_x86_cc" || exit 1 fi else cd tools - ./enumgen.sh --verify + ./enumgen.sh --verify || exit 1 cd .. fi diff --git a/test/asmjit_test_unit.cpp b/test/asmjit_test_unit.cpp index bb75f7a..3aac740 100644 --- a/test/asmjit_test_unit.cpp +++ b/test/asmjit_test_unit.cpp @@ -72,6 +72,7 @@ static void dumpCpu(void) noexcept { // [CPU Features] // -------------------------------------------------------------------------- +#ifndef ASMJIT_NO_LOGGING INFO("CPU Features:"); BaseFeatures::Iterator it(cpu.features().iterator()); while (it.hasNext()) { @@ -81,6 +82,7 @@ static void dumpCpu(void) noexcept { INFO(" %s\n", featureString.data()); }; INFO(""); +#endif // !ASMJIT_NO_LOGGING } // ============================================================================ diff --git a/test/asmjit_test_x86_instinfo.cpp b/test/asmjit_test_x86_instinfo.cpp index fea55d5..1d7d500 100644 --- a/test/asmjit_test_x86_instinfo.cpp +++ b/test/asmjit_test_x86_instinfo.cpp @@ -29,12 +29,19 @@ using namespace asmjit; static void printInfo(uint32_t arch, const BaseInst& inst, const Operand_* operands, size_t opCount) { StringTmp<512> sb; + // Read & Write Information + // ------------------------ + InstRWInfo rw; InstAPI::queryRWInfo(arch, inst, operands, opCount, &rw); sb.append("Instruction:\n"); sb.append(" "); +#ifndef ASMJIT_NO_LOGGING Formatter::formatInstruction(sb, 0, nullptr, arch, inst, operands, opCount); +#else + sb.append(""); +#endif sb.append("\n"); sb.append("Operands:\n"); @@ -49,8 +56,13 @@ static void printInfo(uint32_t arch, const BaseInst& inst, const Operand_* opera sb.append("\n"); } + // CPU Features + // ------------ + BaseFeatures features; InstAPI::queryFeatures(arch, inst, operands, opCount, &features); + +#ifndef ASMJIT_NO_LOGGING if (!features.empty()) { sb.append("Features:\n"); sb.append(" "); @@ -66,6 +78,7 @@ static void printInfo(uint32_t arch, const BaseInst& inst, const Operand_* opera } sb.append("\n"); } +#endif printf("%s\n", sb.data()); } diff --git a/test/asmjit_test_x86_sections.cpp b/test/asmjit_test_x86_sections.cpp index 6aceae1..ddafd63 100644 --- a/test/asmjit_test_x86_sections.cpp +++ b/test/asmjit_test_x86_sections.cpp @@ -55,7 +55,7 @@ static void fail(const char* message, Error err) { int main() { printf("AsmJit X86 Sections Test\n\n"); - Environment env(Environment::kArchHost); + Environment env = hostEnvironment(); JitAllocator allocator; #ifndef ASMJIT_NO_LOGGING