autotest: add more install-script-in-context methods

This commit is contained in:
Peter Barker 2023-02-16 12:52:57 +11:00 committed by Peter Barker
parent d426c73d0e
commit 1aabcbd4b9

View File

@ -4140,11 +4140,21 @@ class AutoTest(ABC):
def install_example_script_context(self, scriptname):
'''installs an example script which will be removed when the context goes
away'''
if self.mav is None:
return
self.install_example_script(scriptname)
self.context_get().installed_scripts.append(scriptname)
def install_test_script_context(self, scriptname):
'''installs an test script which will be removed when the context goes
away'''
self.install_test_script(scriptname)
self.context_get().installed_scripts.append(scriptname)
def install_applet_script_context(self, scriptname):
'''installs an applet script which will be removed when the context goes
away'''
self.install_applet_script(scriptname)
self.context_get().installed_scripts.append(scriptname)
def rootdir(self):
this_dir = os.path.dirname(__file__)
return os.path.realpath(os.path.join(this_dir, "../.."))