##// END OF EJS Templates
hghave: add predicates for embedded and filesystem pyoxidizer resources...
Matt Harbison -
r50728:a2356e15 stable
parent child Browse files
Show More
@@ -202,6 +202,22 b' def has_pyoxidizer():'
202 return 'PYOXIDIZED_INSTALLED_AS_HG' in os.environ
202 return 'PYOXIDIZED_INSTALLED_AS_HG' in os.environ
203
203
204
204
205 @check(
206 "pyoxidizer-in-memory",
207 "running with pyoxidizer build as 'hg' with embedded resources",
208 )
209 def has_pyoxidizer():
210 return 'PYOXIDIZED_IN_MEMORY_RSRC' in os.environ
211
212
213 @check(
214 "pyoxidizer-in-filesystem",
215 "running with pyoxidizer build as 'hg' with external resources",
216 )
217 def has_pyoxidizer():
218 return 'PYOXIDIZED_FILESYSTEM_RSRC' in os.environ
219
220
205 @check("cvs", "cvs client/server")
221 @check("cvs", "cvs client/server")
206 def has_cvs():
222 def has_cvs():
207 re = br'Concurrent Versions System.*?server'
223 re = br'Concurrent Versions System.*?server'
@@ -3451,6 +3451,9 b' class TestRunner:'
3451 verbosity = 2
3451 verbosity = 2
3452 runner = TextTestRunner(self, verbosity=verbosity)
3452 runner = TextTestRunner(self, verbosity=verbosity)
3453
3453
3454 osenvironb.pop(b'PYOXIDIZED_IN_MEMORY_RSRC', None)
3455 osenvironb.pop(b'PYOXIDIZED_FILESYSTEM_RSRC', None)
3456
3454 if self.options.list_tests:
3457 if self.options.list_tests:
3455 result = runner.listtests(suite)
3458 result = runner.listtests(suite)
3456 else:
3459 else:
@@ -3886,6 +3889,20 b' class TestRunner:'
3886 sys.stdout.buffer.write(out)
3889 sys.stdout.buffer.write(out)
3887 sys.exit(1)
3890 sys.exit(1)
3888
3891
3892 cmd = _bytes2sys(b"%s debuginstall -Tjson" % self._hgcommand)
3893 p = subprocess.Popen(cmd, stdout=subprocess.PIPE, shell=True)
3894 out, err = p.communicate()
3895
3896 props = json.loads(out)[0]
3897
3898 # Affects hghave.py
3899 osenvironb.pop(b'PYOXIDIZED_IN_MEMORY_RSRC', None)
3900 osenvironb.pop(b'PYOXIDIZED_FILESYSTEM_RSRC', None)
3901 if props["hgmodules"] == props["pythonexe"]:
3902 osenvironb[b'PYOXIDIZED_IN_MEMORY_RSRC'] = b'1'
3903 else:
3904 osenvironb[b'PYOXIDIZED_FILESYSTEM_RSRC'] = b'1'
3905
3889 def _outputcoverage(self):
3906 def _outputcoverage(self):
3890 """Produce code coverage output."""
3907 """Produce code coverage output."""
3891 import coverage
3908 import coverage
General Comments 0
You need to be logged in to leave comments. Login now