File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 3232 - name : Install prerequisites
3333 run : scripts/install-prerequisites.sh
3434 - name : Building ${{ matrix.build_option }}
35- run : python tests/main.py --build-option=${{ matrix.build_option }} build
35+ run : python tests/main.py --build-option=${{ matrix.build_option }} build --auto-clean
3636
3737 build-windows-GCC :
3838 runs-on : windows-2022
@@ -104,7 +104,7 @@ jobs:
104104 if : matrix.build_config == '32bit build'
105105 run : echo "NON_AMD64_BUILD=1" >> $GITHUB_ENV
106106 - name : Run tests
107- run : python tests/main.py --report --update-image test
107+ run : python tests/main.py --report --update-image test --auto-clean
108108 - name : Archive screenshot errors
109109 if : failure()
110110 uses : actions/upload-artifact@v4
Original file line number Diff line number Diff line change @@ -236,6 +236,8 @@ def generate_test_images():
236236 help = 'select test suite to run' )
237237 parser .add_argument ('--update-image' , action = 'store_true' , default = False ,
238238 help = 'Update test image using LVGLImage.py script' )
239+ parser .add_argument ('--auto-clean' , action = 'store_true' , default = False ,
240+ help = 'Automatically clean build directories' )
239241
240242 args = parser .parse_args ()
241243
@@ -262,6 +264,10 @@ def generate_test_images():
262264 run_tests (options_name , args .test_suite )
263265 except subprocess .CalledProcessError as e :
264266 sys .exit (e .returncode )
267+ if args .auto_clean :
268+ build_dir = get_build_dir (options_name )
269+ print ("Removing " + build_dir )
270+ shutil . rmtree (build_dir )
265271
266272 if args .report :
267273 generate_code_coverage_report ()
You can’t perform that action at this time.
0 commit comments