Fixed broken CI

This commit is contained in:
kobalicek
2020-06-01 10:16:33 +02:00
parent b73830c291
commit 0e04695f64
4 changed files with 25 additions and 10 deletions

View File

@@ -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

View File

@@ -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
}
// ============================================================================

View File

@@ -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("<Logging-Not-Available>");
#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());
}

View File

@@ -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