mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 03:20:18 +00:00
up
Update main.yml Update main.yml up Update main.yml update Update main.yml up Update 04_str.py Update run_tests.sh
This commit is contained in:
parent
c39fa047fe
commit
7a07eefed0
16
.github/workflows/main.yml
vendored
16
.github/workflows/main.yml
vendored
@ -5,7 +5,7 @@ jobs:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Clang
|
||||
- name: Setup Clang
|
||||
uses: egor-tensin/setup-clang@v1
|
||||
with:
|
||||
version: 15
|
||||
@ -53,14 +53,24 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Clang
|
||||
- name: Setup Clang
|
||||
uses: egor-tensin/setup-clang@v1
|
||||
with:
|
||||
version: 15
|
||||
platform: x64
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
sudo apt install -y libc++-15-dev libc++1-15 libc++abi-15-dev libc++abi1-15 libclang-rt-15-dev
|
||||
- name: Coverage Test
|
||||
run: |
|
||||
python3 preprocess.py
|
||||
bash run_tests.sh
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: coverage
|
||||
path: .coverage
|
||||
- name: Compiling
|
||||
run: |
|
||||
sudo apt install -y libc++-15-dev libc++1-15 libc++abi-15-dev libc++abi1-15
|
||||
python3 build.py linux
|
||||
python3 build.py linux -lib
|
||||
python3 scripts/run_tests.py
|
||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,6 +3,7 @@ __pycache__/
|
||||
.ipynb_checkpoints
|
||||
.DS_Store
|
||||
.hidden
|
||||
.coverage
|
||||
|
||||
src/main
|
||||
gmon.out
|
||||
|
@ -1,6 +0,0 @@
|
||||
clang++ -std=c++17 -fno-rtti --coverage -Wall -o pocketpy src/main.cpp
|
||||
python3 scripts/run_tests.py
|
||||
llvm-cov-15 gcov main.gc -r -s src/
|
||||
rm -rf .coverage
|
||||
mkdir -p .coverage
|
||||
mv *.gcov .coverage
|
10
run_tests.sh
Normal file
10
run_tests.sh
Normal file
@ -0,0 +1,10 @@
|
||||
clang++ -std=c++17 -fno-rtti --coverage -stdlib=libc++ -Wall -o pocketpy src/main.cpp
|
||||
python3 scripts/run_tests.py
|
||||
rm -rf .coverage
|
||||
mkdir -p .coverage
|
||||
llvm-cov-15 gcov main.gc -r -s src/ >> .coverage/coverage.txt
|
||||
mv *.gcov .coverage
|
||||
rm main.gc*
|
||||
|
||||
# -fprofile-instr-generate -fcoverage-mapping
|
||||
# llvm-cov-15 show main.gc -instr-profile=default.profraw -format=html -output-dir .coverage
|
@ -12,7 +12,7 @@ def test_file(filepath, cpython=False):
|
||||
|
||||
def test_dir(path):
|
||||
print("Testing directory:", path)
|
||||
for filename in os.listdir(path):
|
||||
for filename in sorted(os.listdir(path)):
|
||||
if not filename.endswith('.py'):
|
||||
continue
|
||||
filepath = os.path.join(path, filename)
|
||||
|
@ -70,4 +70,9 @@ def f():
|
||||
assert '|'.join(f()) == '0|1|2|3|4'
|
||||
|
||||
num = 6
|
||||
assert str(num) == '6'
|
||||
assert str(num) == '6'
|
||||
|
||||
# test Lo group names
|
||||
|
||||
测试 = "test"
|
||||
assert 测试 == "test"
|
Loading…
x
Reference in New Issue
Block a user