mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-09-06 09:51:27 +00:00
Add regression test CI (#4512)
The entire CI test run takes approximately 3 minutes. The test run fails if there is at least one failed case (failed > 0).
This commit is contained in:
parent
2685f2cae0
commit
6c6447fadb
|
@ -371,6 +371,47 @@ jobs:
|
||||||
ctest
|
ctest
|
||||||
working-directory: tests/unit
|
working-directory: tests/unit
|
||||||
|
|
||||||
|
build_regression_tests:
|
||||||
|
needs:
|
||||||
|
[build_llvm_libraries_on_ubuntu_2204]
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-22.04]
|
||||||
|
include:
|
||||||
|
- os: ubuntu-22.04
|
||||||
|
llvm_cache_key: ${{ needs.build_llvm_libraries_on_ubuntu_2204.outputs.cache_key }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Get LLVM libraries
|
||||||
|
id: retrieve_llvm_libs
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
./core/deps/llvm/build/bin
|
||||||
|
./core/deps/llvm/build/include
|
||||||
|
./core/deps/llvm/build/lib
|
||||||
|
./core/deps/llvm/build/libexec
|
||||||
|
./core/deps/llvm/build/share
|
||||||
|
key: ${{ matrix.llvm_cache_key }}
|
||||||
|
|
||||||
|
- name: Quit if cache miss
|
||||||
|
if: (steps.retrieve_llvm_libs.outputs.cache-hit != 'true')
|
||||||
|
run: echo "::error::can not get prebuilt llvm libraries" && exit 1
|
||||||
|
|
||||||
|
- name: Build wamrc and iwasm
|
||||||
|
run: |
|
||||||
|
./build_wamr.sh
|
||||||
|
working-directory: tests/regression/ba-issues
|
||||||
|
|
||||||
|
- name: Run regression tests
|
||||||
|
run: |
|
||||||
|
python run.py
|
||||||
|
working-directory: tests/regression/ba-issues
|
||||||
|
|
||||||
build_samples_wasm_c_api:
|
build_samples_wasm_c_api:
|
||||||
needs:
|
needs:
|
||||||
[
|
[
|
||||||
|
|
|
@ -11,6 +11,7 @@ import subprocess
|
||||||
import glob
|
import glob
|
||||||
import re
|
import re
|
||||||
import argparse
|
import argparse
|
||||||
|
import sys
|
||||||
|
|
||||||
from typing import Dict, Optional, List
|
from typing import Dict, Optional, List
|
||||||
|
|
||||||
|
@ -275,6 +276,11 @@ def process_and_run_test_cases(
|
||||||
else:
|
else:
|
||||||
print(f" Issues not found in folder: {format_issue_ids_should_test}")
|
print(f" Issues not found in folder: {format_issue_ids_should_test}")
|
||||||
|
|
||||||
|
if failed > 0:
|
||||||
|
# Exit with error code if there are failed test for CI
|
||||||
|
print("Some tests failed, see log file for details.")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
parser = argparse.ArgumentParser(description="Run BA issue tests.")
|
parser = argparse.ArgumentParser(description="Run BA issue tests.")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user