Don't require --debugfs and --tmpdir when --flattened is used.
Also fix runtests.sh to not build debugfs when testing a flattened APEX.
Test: art/build/apex/runtests.sh (ignoring libziparchive failure due to b/138103882)
Test: art/build/apex/art_apex_test.py --flattened \
--debug out/target/product/taimen/system/apex/com.android.runtime.debug
Bug: 135535106
Change-Id: Id1b56646c28587c7dfb4a2f140706f2d29c8dfb3
diff --git a/build/apex/art_apex_test.py b/build/apex/art_apex_test.py
index 42156a4..8058816 100755
--- a/build/apex/art_apex_test.py
+++ b/build/apex/art_apex_test.py
@@ -1056,10 +1056,10 @@
if test_args.host and test_args.testing:
logging.error("Both of --host and --testing set")
return 1
- if not test_args.tmpdir:
+ if not test_args.flattened and not test_args.tmpdir:
logging.error("Need a tmpdir.")
return 1
- if not test_args.host and not test_args.debugfs:
+ if not test_args.flattened and not test_args.host and not test_args.debugfs:
logging.error("Need debugfs.")
return 1
if test_args.bitness not in ['32', '64', 'multilib', 'auto']: