diff options
author | root <root@bryanarubuntu1604.gkcdsof10ynupexqshuygvl5bb.dx.internal.cloudapp.net> | 2016-11-21 03:34:47 +0300 |
---|---|---|
committer | root <root@bryanarubuntu1604.gkcdsof10ynupexqshuygvl5bb.dx.internal.cloudapp.net> | 2016-11-21 03:55:37 +0300 |
commit | f895ac6b595ff03a22bd1278f803dbfe29c61e75 (patch) | |
tree | 40767124310b01e85d94d0b021b2ddccb3927081 /tools | |
parent | c95654b72e193d70fe8184167a86f2cc989650ff (diff) |
adjusting working directory
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/dotnet-bootstrap/base/lab/cases.py | 12 | ||||
-rwxr-xr-x | tools/dotnet-bootstrap/base/lab/containers.py | 4 |
2 files changed, 9 insertions, 7 deletions
diff --git a/tools/dotnet-bootstrap/base/lab/cases.py b/tools/dotnet-bootstrap/base/lab/cases.py index f2d42975..3e6f74bc 100755 --- a/tools/dotnet-bootstrap/base/lab/cases.py +++ b/tools/dotnet-bootstrap/base/lab/cases.py @@ -6,16 +6,16 @@ from shellcall import ShellCall from shellcall import ContinueOnError from sys import argv from os import getcwd -from os.path import join -from os.path import exists + +from os.path import join, exists, dirname, realpath from globals import g_override # interface + data binding for managing the testcases. class Cases: - # TODO: use script directory instead of cwd, and require the containers directory to be local to the script - _supported_containers = join(getcwd(), 'containers/') # our 'list' of current supported platforms are the directories in this directory - _testcases = join(getcwd(), 'cases/') + _labPath = dirname(realpath(__file__)) + _supported_containers = join(_labPath, 'containers/') # our 'list' of current supported platforms are the directories in this directory + _testcases = join(_labPath, 'cases/') _continueOnError = True _lenient = True @@ -38,7 +38,7 @@ class Cases: ShellCall("echo \"running 'dotnet-bootstrap:%s - testcase: %s'\""%(container_name, casename), lenient = self._lenient) # copy the bootstrap and test source in to the container working directory (next to the Dockerfile) - ShellCall('cp ../../dotnet.bootstrap.py %s'%(join(self._supported_containers, container_name)), lenient = self._lenient) + ShellCall('cp %s %s'%(join(self._labPath, '../../dotnet.bootstrap.py'), join(self._supported_containers, container_name)), lenient = self._lenient) ShellCall('mkdir -p %s'%(join(testing_destination, casename)), lenient=self._lenient) ShellCall('cp -R %s %s'%(join(self._testcases, casename), join(testing_destination, casename)), lenient = self._lenient) diff --git a/tools/dotnet-bootstrap/base/lab/containers.py b/tools/dotnet-bootstrap/base/lab/containers.py index 2afff3b1..7b52a276 100755 --- a/tools/dotnet-bootstrap/base/lab/containers.py +++ b/tools/dotnet-bootstrap/base/lab/containers.py @@ -12,13 +12,15 @@ import os from sys import argv from os.path import join +from os.path import dirname +from os.path import realpath from os import getcwd from globals import g_override # interface + data binding for managing the containers. class Containers: - _supported_platforms = join(getcwd(), 'containers') + '/' # our 'list' of current supported platforms are the directories in this directory + _supported_platforms = join(dirname(realpath(__file__)), 'containers') + '/' # our 'list' of current supported platforms are the directories in this directory def Bake(self, selected_platform): ShellCall("echo baking 'dotnet-bootstrap:%s'"%(selected_platform), lenient=True) |