<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<br>
<br>
<font size="+1">OK. To fix Stefano's other complaint, I see now
that it is best to move the logic to report_tests.py with a new
flag. This will fix all bashism's as well as fix Jed's complaint
of the weird programming of having a null dependency.<br>
<br>
Scott<br>
<br>
</font><br>
<div class="moz-cite-prefix">On 1/20/21 7:40 AM, Satish Balay via
petsc-dev wrote:<br>
</div>
<blockquote type="cite"
cite="mid:9b61b8ca-2e6-f95c-ab3a-e0435a5ebc7d@mcs.anl.gov">
<pre wrap="">Probably best to stick with 'sh' - if bash were universal - we could add in this dependency..
diff --git a/config/BuildSystem/config/programs.py b/config/BuildSystem/config/programs.py
index f35baa2e0c..6a684310dd 100755
--- a/config/BuildSystem/config/programs.py
+++ b/config/BuildSystem/config/programs.py
@@ -70,7 +70,7 @@ class Configure(config.base.Configure):
def configurePrograms(self):
'''Check for the programs needed to build and run PETSc'''
- self.getExecutable('sh', getFullPath = 1, resultName = 'SHELL')
+ self.getExecutable('bash', getFullPath = 1, resultName = 'SHELL')
if not hasattr(self, 'SHELL'): raise RuntimeError('Could not locate sh executable')
self.getExecutable('sed', getFullPath = 1)
if not hasattr(self, 'sed'): raise RuntimeError('Could not locate sed executable')
Satish
On Wed, 20 Jan 2021, Stefano Zampini wrote:
</pre>
<blockquote type="cite">
<pre wrap="">as long as this gets fixed, I'm fine with any solution
Il giorno mer 20 gen 2021 alle ore 16:04 Pierre Jolivet <a class="moz-txt-link-rfc2396E" href="mailto:pierre@joliv.et"><pierre@joliv.et></a>
ha scritto:
</pre>
<blockquote type="cite">
<pre wrap="">Sorry for the noise, I'm now just realizing that it is in fact exactly the
same bash-ism… (I prefer my “fix” though, but I guess the rest of Stefano’s
comment still holds true).
Thanks,
Pierre
On 20 Jan 2021, at 1:59 PM, Pierre Jolivet <a class="moz-txt-link-rfc2396E" href="mailto:pierre@joliv.et"><pierre@joliv.et></a> wrote:
On 20 Jan 2021, at 12:11 PM, Stefano Zampini <a class="moz-txt-link-rfc2396E" href="mailto:stefano.zampini@gmail.com"><stefano.zampini@gmail.com></a>
wrote:
This is an issue with the default shell used by the makefile. Below is my
fix. We should probably have a CI machine that checks for these
shell-related errors.
I second this. Just spent too much time finding this other bash-ism in
gmakefile.test…
<a class="moz-txt-link-freetext" href="https://gitlab.com/petsc/petsc/-/commit/e4b11943e93779206a0e5f2091646de2e86b10e3#551c4017403b9179c385d5600f43348b6288a751">https://gitlab.com/petsc/petsc/-/commit/e4b11943e93779206a0e5f2091646de2e86b10e3#551c4017403b9179c385d5600f43348b6288a751</a>
2021-01-20T11:21:22.5942304Z /usr/bin/sh: 1: test: false: unexpected operator
2021-01-20T11:21:22.5981176Z make: *** [gmakefile.test:270: check-test-errors] Error 1
Thanks,
Pierre
diff --git a/gmakefile.test b/gmakefile.test
index c38e37f..ffd7bdb 100644
--- a/gmakefile.test
+++ b/gmakefile.test
@@ -379,10 +379,11 @@ starttime: pre-clean $(libpetscall)
@$(eval STARTTIME := $(shell date +%s))
report_tests: starttime $(TESTTARGETS)
+ifeq ($(showreport),true)
@$(eval ENDTIME := $(shell date +%s))
- -@if test ${showreport} == "true"; then
elapsed_time=$$(($(ENDTIME)- $(STARTTIME))) && \
- $(PYTHON) $(CONFIGDIR)/report_tests.py -m $(MAKE) -d
$(TESTDIR)/counts -t 5 -e $${elapsed_time};\
- fi
+ elapsed_time=$$(($(ENDTIME)- $(STARTTIME))) && \
+ $(PYTHON) $(CONFIGDIR)/report_tests.py -m $(MAKE) -d
$(TESTDIR)/counts -t 5 -e $${elapsed_time};
+endif
Il giorno mar 19 gen 2021 alle ore 20:41 Scott Kruger <a class="moz-txt-link-rfc2396E" href="mailto:kruger@txcorp.com"><kruger@txcorp.com></a>
ha scritto:
</pre>
<blockquote type="cite">
<pre wrap="">
I can't reproduce this with the latest master:
hip 1261: git pull
Already up to date.
hip 1262: make -f gmakefile.test test search='notatest'
Using MAKEFLAGS: -- search=notatest
hip 1263:
On 1/19/21 8:19 AM, Stefano Zampini wrote:
Just rebased over latest master and got this
zampins@vulture:~/Devel/petsc$ make -f gmakefile.test test
search='notatest'
Using MAKEFLAGS: -- search=notatest
/bin/sh: 1: test: false: unexpected operator
--
Stefano
--
Tech-X Corporation <a class="moz-txt-link-abbreviated" href="mailto:kruger@txcorp.com">kruger@txcorp.com</a>
5621 Arapahoe Ave, Suite A Phone: (720) 466-3196
Boulder, CO 80303 Fax: (303) 448-7756
</pre>
</blockquote>
<pre wrap="">
--
Stefano
</pre>
</blockquote>
<pre wrap="">
</pre>
</blockquote>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Tech-X Corporation <a class="moz-txt-link-abbreviated" href="mailto:kruger@txcorp.com">kruger@txcorp.com</a>
5621 Arapahoe Ave, Suite A Phone: (720) 466-3196
Boulder, CO 80303 Fax: (303) 448-7756</pre>
</body>
</html>