Fix the output of art_apex_test.py's `--list` option.
Test: Run "art/build/apex/runtests.sh -l" and check the output
Change-Id: I3c743f4ceb39f6491d7384cef1a794ae8039ac6e
diff --git a/build/apex/art_apex_test.py b/build/apex/art_apex_test.py
index dc95f93..31358a0 100755
--- a/build/apex/art_apex_test.py
+++ b/build/apex/art_apex_test.py
@@ -615,10 +615,13 @@
if '..' in apex_map:
del apex_map['..']
for (_, val) in sorted(apex_map.items()):
- self._path = os.path.join(self._path, val.name)
- print(self._path)
+ val_path = os.path.join(self._path, val.name)
+ print(val_path)
if val.is_dir:
+ saved_dir = self._path
+ self._path = val_path
self.print_list()
+ self._path = saved_dir
class Tree: