diff --git a/golden-files/results/perl6_syntax-perl6_p6 b/golden-files/results/perl6_syntax-perl6_p6 index 9f4a56f..032e5f9 100644 --- a/golden-files/results/perl6_syntax-perl6_p6 +++ b/golden-files/results/perl6_syntax-perl6_p6 @@ -1,6 +1,6 @@ ===SORRY!=== Two terms in a row across lines (missing semicolon or comma?) -at /home/ahamilton/code/vigil/golden-files/./input/perl6.p6:30 +at /tmp/vigil/golden-files/./input/perl6.p6:30 ------> say 'Hello from Perl 6!'⏏ expecting any of: infix @@ -11,6 +11,6 @@ at /home/ahamilton/code/vigil/golden-files/./input/perl6.p6:30 statement modifier loop Other potential difficulties: Useless declaration of a has-scoped method in mainline (did you mean 'my regex http-verb'?) - at /home/ahamilton/code/vigil/golden-files/./input/perl6.p6:11 + at /tmp/vigil/golden-files/./input/perl6.p6:11 ------> regex ⏏http-verb { \ No newline at end of file diff --git a/golden-files/results/perl_syntax-perl6_pl b/golden-files/results/perl_syntax-perl6_pl index 43768f4..faa0933 100644 --- a/golden-files/results/perl_syntax-perl6_pl +++ b/golden-files/results/perl_syntax-perl6_pl @@ -1,6 +1,6 @@ ===SORRY!=== Two terms in a row across lines (missing semicolon or comma?) -at /home/ahamilton/code/vigil/golden-files/./input/perl6.pl:30 +at /tmp/vigil/golden-files/./input/perl6.pl:30 ------> say 'Hello from Perl 6!'⏏ expecting any of: infix @@ -11,6 +11,6 @@ at /home/ahamilton/code/vigil/golden-files/./input/perl6.pl:30 statement modifier loop Other potential difficulties: Useless declaration of a has-scoped method in mainline (did you mean 'my regex http-verb'?) - at /home/ahamilton/code/vigil/golden-files/./input/perl6.pl:11 + at /tmp/vigil/golden-files/./input/perl6.pl:11 ------> regex ⏏http-verb { \ No newline at end of file diff --git a/golden-files/results/pydoc-hi3_py b/golden-files/results/pydoc-hi3_py index 2f94fbf..e033fda 100644 --- a/golden-files/results/pydoc-hi3_py +++ b/golden-files/results/pydoc-hi3_py @@ -1,12 +1,12 @@ -Help on module hi3: - -NAME - hi3 - -FUNCTIONS - hi() - -FILE - /home/ahamilton/code/vigil/golden-files/input/hi3.py - - \ No newline at end of file +Help on module hi3: + +NAME + hi3 + +FUNCTIONS + hi() + +FILE + /tmp/vigil/golden-files/input/hi3.py + + \ No newline at end of file diff --git a/golden-files/results/pydoc-hi_py b/golden-files/results/pydoc-hi_py index 6aa598e..6ebd5d4 100644 --- a/golden-files/results/pydoc-hi_py +++ b/golden-files/results/pydoc-hi_py @@ -1,12 +1,12 @@ -Help on module hi: - -NAME - hi - -FILE - /home/ahamilton/code/vigil/golden-files/input/hi.py - -FUNCTIONS - hi() - - \ No newline at end of file +Help on module hi: + +NAME + hi + +FILE + /tmp/vigil/golden-files/input/hi.py + +FUNCTIONS + hi() + + \ No newline at end of file diff --git a/tools_test.py b/tools_test.py index c015d8f..eb8c77e 100755 --- a/tools_test.py +++ b/tools_test.py @@ -5,6 +5,7 @@ import contextlib import os +import subprocess import unittest import unittest.mock @@ -15,6 +16,7 @@ import tools os.environ["TZ"] = "GMT" VIGIL_ROOT = os.path.dirname(__file__) +TMP_ROOT = "/tmp/vigil" def widget_to_string(widget): @@ -38,7 +40,7 @@ def result_path(tool, input_filename): def run_tool(tool, input_filename): - with chdir(os.path.join(VIGIL_ROOT, "golden-files")): + with chdir(os.path.join(TMP_ROOT, "golden-files")): return tool(os.path.join(".", "input", input_filename)) @@ -209,4 +211,10 @@ class LruCacheWithEvictionTestCase(unittest.TestCase): if __name__ == "__main__": - golden.main() + os.makedirs(TMP_ROOT, exist_ok=True) + subprocess.check_call(["sudo", "mount", "--bind", VIGIL_ROOT, TMP_ROOT]) + try: + golden.main() + finally: + subprocess.check_call(["sudo", "umount", "--lazy", TMP_ROOT]) + os.rmdir(TMP_ROOT)