##// END OF EJS Templates
run-tests: support --pyoxidized on macOS...
Matt Harbison -
r50727:9a4c76cc stable
parent child Browse files
Show More
@@ -86,6 +86,7 b' if sys.version_info < (3, 5, 0):'
86 )
86 )
87 sys.exit(70) # EX_SOFTWARE from `man 3 sysexit`
87 sys.exit(70) # EX_SOFTWARE from `man 3 sysexit`
88
88
89 MACOS = sys.platform == 'darwin'
89 WINDOWS = os.name == r'nt'
90 WINDOWS = os.name == r'nt'
90 shellquote = shlex.quote
91 shellquote = shlex.quote
91
92
@@ -745,8 +746,8 b' def parseargs(args, parser):'
745 parser.error('chg does not work on %s' % os.name)
746 parser.error('chg does not work on %s' % os.name)
746 if (options.rhg or options.with_rhg) and WINDOWS:
747 if (options.rhg or options.with_rhg) and WINDOWS:
747 parser.error('rhg does not work on %s' % os.name)
748 parser.error('rhg does not work on %s' % os.name)
748 if options.pyoxidized and not WINDOWS:
749 if options.pyoxidized and not (MACOS or WINDOWS):
749 parser.error('--pyoxidized is currently Windows only')
750 parser.error('--pyoxidized is currently macOS and Windows only')
750 if options.with_chg:
751 if options.with_chg:
751 options.chg = False # no installation to temporary location
752 options.chg = False # no installation to temporary location
752 options.with_chg = canonpath(_sys2bytes(options.with_chg))
753 options.with_chg = canonpath(_sys2bytes(options.with_chg))
@@ -3205,9 +3206,18 b' class TestRunner:'
3205 testdir = os.path.dirname(_sys2bytes(canonpath(sys.argv[0])))
3206 testdir = os.path.dirname(_sys2bytes(canonpath(sys.argv[0])))
3206 reporootdir = os.path.dirname(testdir)
3207 reporootdir = os.path.dirname(testdir)
3207 # XXX we should ideally install stuff instead of using the local build
3208 # XXX we should ideally install stuff instead of using the local build
3208 bin_path = (
3209
3209 b'build/pyoxidizer/x86_64-pc-windows-msvc/release/app/hg.exe'
3210 exe = b'hg'
3210 )
3211 triple = b''
3212
3213 if WINDOWS:
3214 triple = b'x86_64-pc-windows-msvc'
3215 exe = b'hg.exe'
3216 elif MACOS:
3217 # TODO: support Apple silicon too
3218 triple = b'x86_64-apple-darwin'
3219
3220 bin_path = b'build/pyoxidizer/%s/release/app/%s' % (triple, exe)
3211 full_path = os.path.join(reporootdir, bin_path)
3221 full_path = os.path.join(reporootdir, bin_path)
3212 self._hgcommand = full_path
3222 self._hgcommand = full_path
3213 # Affects hghave.py
3223 # Affects hghave.py
@@ -3851,8 +3861,15 b' class TestRunner:'
3851 vlog('# build a pyoxidized version of Mercurial')
3861 vlog('# build a pyoxidized version of Mercurial')
3852 assert os.path.dirname(self._bindir) == self._installdir
3862 assert os.path.dirname(self._bindir) == self._installdir
3853 assert self._hgroot, 'must be called after _installhg()'
3863 assert self._hgroot, 'must be called after _installhg()'
3854 cmd = b'"%(make)s" pyoxidizer-windows-tests' % {
3864 target = b''
3865 if WINDOWS:
3866 target = b'windows'
3867 elif MACOS:
3868 target = b'macos'
3869
3870 cmd = b'"%(make)s" pyoxidizer-%(platform)s-tests' % {
3855 b'make': b'make',
3871 b'make': b'make',
3872 b'platform': target,
3856 }
3873 }
3857 cwd = self._hgroot
3874 cwd = self._hgroot
3858 vlog("# Running", cmd)
3875 vlog("# Running", cmd)
General Comments 0
You need to be logged in to leave comments. Login now