sys-script: remove output directory if it exists
meson will occasionally call us even though the output directory
exists. Let's just nuke and recreate in that case.
diff --git a/test/sys-script.py b/test/sys-script.py
index ac13697..2de7d7e 100755
--- a/test/sys-script.py
+++ b/test/sys-script.py
@@ -20,6 +20,7 @@
#
import os, sys
+import shutil
def d(path, mode):
os.mkdir(path, mode)
@@ -40,6 +41,8 @@
os.chdir(sys.argv[1])
+if os.path.exists('sys'):
+ shutil.rmtree('sys')
d('sys', 0o755)
d('sys/kernel', 0o775)
f('sys/kernel/kexec_crash_loaded', 0o664, b'0\n')