xref: /aosp_15_r20/external/jsoncpp/test/cleantests.py (revision 4484440890e2bc6e07362b4feaf15601abfe0071)
1*44844408SAndroid Build Coastguard Worker# Copyright 2007 Baptiste Lepilleur and The JsonCpp Authors
2*44844408SAndroid Build Coastguard Worker# Distributed under MIT license, or public domain if desired and
3*44844408SAndroid Build Coastguard Worker# recognized in your jurisdiction.
4*44844408SAndroid Build Coastguard Worker# See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
5*44844408SAndroid Build Coastguard Worker
6*44844408SAndroid Build Coastguard Worker"""Removes all files created during testing."""
7*44844408SAndroid Build Coastguard Worker
8*44844408SAndroid Build Coastguard Workerimport glob
9*44844408SAndroid Build Coastguard Workerimport os
10*44844408SAndroid Build Coastguard Worker
11*44844408SAndroid Build Coastguard Workerpaths = []
12*44844408SAndroid Build Coastguard Workerfor pattern in [ '*.actual', '*.actual-rewrite', '*.rewrite', '*.process-output' ]:
13*44844408SAndroid Build Coastguard Worker    paths += glob.glob('data/' + pattern)
14*44844408SAndroid Build Coastguard Worker
15*44844408SAndroid Build Coastguard Workerfor path in paths:
16*44844408SAndroid Build Coastguard Worker    os.unlink(path)
17