Hi - I am one step further with haredo - cf. below - and have only just subscribed to the haredo
mailing list - so take this e-mail of mine as a very rough progress
report / test if I can properly mail to the haredo mailing list - with
more details to come ...
So I can do the first steps successfully:
bootstrap.sh
boostrap.sh install
with some path issues on my side resolved now (I am happy to provide
more details soon )
but testing fails for me with:
rx@laptop {main} ~/tmp/haredo2 $ PATH=$PWD/bin:~/opt/hare/bin:$PATH haredo test
haredo test
haredo bin/haredo
haredo bin/haredo (skipped)
/home/rx/tmp/haredo2/test.do: 4: export: Illegal option -n
haredo test (error: exited with status 2)
My suspicion is:
export is a bash builtin - and not available in plain shell - and thus
should not be found in a haredo script: test.do
Again: more details to come.
Thanks,
-A
Autumn! <autumnull@posteo.net> writes:
> could you send a copy of the issues you've been having to the> haredo-devel mailing list? the address is listed at the bottom of the> README: https://sr.ht/~autumnull/haredo/>> ty!> ~Autumn
> My suspicion is:> export is a bash builtin - and not available in plain shell - and thus> should not be found in a haredo script: test.do
export is a posix sh builtin:
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#export
however you're right in that -n is not specified by posix. i've now
corrected this to use unset instead -- let me know if it works?
~Autumn
Autumn! <autumnull@posteo.net> writes:
>> My suspicion is:>> export is a bash builtin - and not available in plain shell - and thus>> should not be found in a haredo script: test.do> export is a posix sh builtin:> https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#export> however you're right in that -n is not specified by posix. i've now> corrected this to use unset instead -- let me know if it works?>> ~Autumn
OK, thanks - and this is better, yes:
tests are running now - and I think they are all fine [?] - I am not so
shure about the last few tests though -
I am printing the last 14 lines and their colors here:
...
green: haredo test/all (done)
green: haredo test/clean-gen
green: haredo clean
green: haredo clean (done)
green: haredo test/clean-gen (done)
green: haredo test/should-fail <- maybe this should be in red?
red: haredo test/should-fail (error: exited with status 1)
green: haredo test/unwriteable
green: haredo test/unwriteable (done)
green: haredo test/child-fails
green: haredo should-fail <- maybe this should be in red?
red: haredo should-fail (error: exited with status 1)
yellow: haredo test/child-fails (child failed) <- here I am concerned
green: haredo test (done)
thus I am not so sure about the yellow line, and the two green should fail lines [?] - but maybe that's how
they should be [?] - I haven't looked at the code (the details) yet.
Next time I send a screenshot.
Also I noticed that haredo has become stricter in that it does not accept empty deps any more:
an old clean.do file of mine (with empty deps) would not be accepted any more:
# -*- mode: shell-script -*-
deps=""
if haredo $deps
then
echo >&2 "cleaning..."
rm -f *.o
rm -f *.hi
rm -f *.dyn_o
rm -f *.dyn_hi
rm -f *~
rm -f *.oldfo
rm -f *.oldpdf
fi
rx@laptop ~/jobs/cv/en $ haredo clean
haredo clean
Abort: /home/rx/tmp/haredo/src/haredo.ha:394:64: type assertion failed
Aborted
haredo clean (done)
rx@laptop ~/jobs/cv/en $ type haredo
haredo is hashed (/home/rx/opt/haredo/bin/haredo)
(while I installed my haredo to ~/opt/haredo/bin, the error message points back to ~/tmp/haredo/src/haredo.ha...
where I made/bootstraped it - fine with me):
If I change the above clean.do to just
# -*- mode: shell-script -*-
echo >&2 "cleaning..."
rm -f *.o
rm -f *.hi
rm -f *.dyn_o
rm -f *.dyn_hi
rm -f *~
rm -f *.oldfo
rm -f *.oldpdf
(which I probably should have done anyway) then everything works fine.
Thanks,
A
On 6/7/23 23:54, Andreas Reuleaux wrote:
> ...> green: haredo test/all (done)> green: haredo test/clean-gen> green: haredo clean> green: haredo clean (done)> green: haredo test/clean-gen (done)> green: haredo test/should-fail <- maybe this should be in red?> red: haredo test/should-fail (error: exited with status 1)> green: haredo test/unwriteable> green: haredo test/unwriteable (done)> green: haredo test/child-fails> green: haredo should-fail <- maybe this should be in red?> red: haredo should-fail (error: exited with status 1)> yellow: haredo test/child-fails (child failed) <- here I am concerned> green: haredo test (done)> > thus I am not so sure about the yellow line, and the two green should fail lines [?] - but maybe that's how> they should be [?] - I haven't looked at the code (the details) yet.> Next time I send a screenshot.
screenshot isn't necessary since the parts in (braces) mention the
outcome. all of the lines you pointed out are how they are supposed to
look -- haredo prints a green line when it starts running a target and
then another line when it finishes running, which will have a color
related to the outcome.
strangely though, the "unwriteable" test succeeds when it should fail.
I've added more rigorous checking to test.do to make sure failing tests
fail as they're supposed to. the idea with that test is that
test/unwriteable.do sets its target to be unwriteable, such that when
haredo tries to overwrite it with the temporary $3 file, it fails. i'm
unsure why this would not work for you, i would be grateful if you could
investigate.
> Also I noticed that haredo has become stricter in that it does not accept empty deps any more:
this was a bug, it should now be fixed, let me know if it isn't.
~Autumn
Thanks - and I will have a look at this unwritable test - some time i.e.
(sorry, I am busy)
-A
Autumn! <autumnull@posteo.net> writes:
> On 6/7/23 23:54, Andreas Reuleaux wrote:>> ...>> green: haredo test/all (done)>> green: haredo test/clean-gen>> green: haredo clean>> green: haredo clean (done)>> green: haredo test/clean-gen (done)>> green: haredo test/should-fail <- maybe this should be in red?>> red: haredo test/should-fail (error: exited with status 1)>> green: haredo test/unwriteable>> green: haredo test/unwriteable (done)>> green: haredo test/child-fails>> green: haredo should-fail <- maybe this should be in red?>> red: haredo should-fail (error: exited with status 1)>> yellow: haredo test/child-fails (child failed) <- here I am concerned>> green: haredo test (done)>> thus I am not so sure about the yellow line, and the two green>> should fail lines [?] - but maybe that's how>> they should be [?] - I haven't looked at the code (the details) yet.>> Next time I send a screenshot.> screenshot isn't necessary since the parts in (braces) mention the> outcome. all of the lines you pointed out are how they are supposed to> look -- haredo prints a green line when it starts running a target and> then another line when it finishes running, which will have a color> related to the outcome.>> strangely though, the "unwriteable" test succeeds when it should> fail. I've added more rigorous checking to test.do to make sure> failing tests fail as they're supposed to. the idea with that test is> that test/unwriteable.do sets its target to be unwriteable, such that> when haredo tries to overwrite it with the temporary $3 file, it> fails. i'm unsure why this would not work for you, i would be grateful> if you could investigate.>>> Also I noticed that haredo has become stricter in that it does not accept empty deps any more:> this was a bug, it should now be fixed, let me know if it isn't.>> ~Autumn
I would like to look into this uwritable test some time - but now I am getting
another error when building (bootstrapping) haredo:
rx@laptop ~ $ cd ~/tmp/haredo2 && PATH=$PATH:~/opt/hare/bin QBE=/home/rx/opt/qbe/bin/qbe HAREPATH=/home/rx/opt/hare/src/hare/stdlib ./bootstrap.sh
/home/rx/tmp/haredo2/src/haredo.ha:59:39: error: Unknown object 'signal::SIGUSR1'
59 | signal::handle(signal::SIGUSR1, &handler);
| ^
/home/rx/tmp/haredo2/src/haredo.ha:59:39: error: Argument type invalid is not assignable to parameter type unix::signal::sig
/home/rx/tmp/haredo2/src/haredo.ha:65:61: error: Unknown object 'unix::pipe_flags::NOCLOEXEC'
/home/rx/tmp/haredo2/src/haredo.ha:65:61: error: Array members must be of a uniform type, previously seen unix::pipe_flag, but now see invalid
/home/rx/tmp/haredo2/src/haredo.ha:65:61: error: Argument is not assignable to variadic parameter type
Error: harec: exited with status 1
hare build: build failed
rx@laptop {main} ~/tmp/haredo2 $
with the newest hare - I have reinstalled hare i.e. - maybe I should not
have done this [?] - anyway this is getting in my way now (before I can
bootstrap.sh install, and then test haredo)
Thanks,
A
Autumn! <autumnull@posteo.net> writes:
> On 6/7/23 23:54, Andreas Reuleaux wrote:>> ...>> green: haredo test/all (done)>> green: haredo test/clean-gen>> green: haredo clean>> green: haredo clean (done)>> green: haredo test/clean-gen (done)>> green: haredo test/should-fail <- maybe this should be in red?>> red: haredo test/should-fail (error: exited with status 1)>> green: haredo test/unwriteable>> green: haredo test/unwriteable (done)>> green: haredo test/child-fails>> green: haredo should-fail <- maybe this should be in red?>> red: haredo should-fail (error: exited with status 1)>> yellow: haredo test/child-fails (child failed) <- here I am concerned>> green: haredo test (done)>> thus I am not so sure about the yellow line, and the two green>> should fail lines [?] - but maybe that's how>> they should be [?] - I haven't looked at the code (the details) yet.>> Next time I send a screenshot.> screenshot isn't necessary since the parts in (braces) mention the> outcome. all of the lines you pointed out are how they are supposed to> look -- haredo prints a green line when it starts running a target and> then another line when it finishes running, which will have a color> related to the outcome.>> strangely though, the "unwriteable" test succeeds when it should> fail. I've added more rigorous checking to test.do to make sure> failing tests fail as they're supposed to. the idea with that test is> that test/unwriteable.do sets its target to be unwriteable, such that> when haredo tries to overwrite it with the temporary $3 file, it> fails. i'm unsure why this would not work for you, i would be grateful> if you could investigate.>>> Also I noticed that haredo has become stricter in that it does not accept empty deps any more:> this was a bug, it should now be fixed, let me know if it isn't.>> ~Autumn
> I would like to look into this uwritable test some time - but now I am getting> another error when building (bootstrapping) haredo:
more stdlib updates happened since i fixed it lol. should now be fixed
upstream.
~Autumn
Re: issue with building haredo - unwritable test now
OK, haredo building properly now, thanks.
Now, with regards to the unwritable test:
The original test/unwritable.do makes the file unwritable
(with "chmod -w unwritable") *after* it has been created:
echo "this target is unwriteable so this test should fail" > $3
chmod -w unwriteable
(And as a result I get a file uwritable, with write permissions properly
removed - and not sure why this failed for you already?) - and the last
lines of my test output - as discussed before:
rx@laptop {main} ~/tmp/haredo2/test $ ls -lh unwriteable
-rw-r--r-- 1 rx rx 52 Jun 11 23:54 unwriteable
haredo test/clean-gen (done)
haredo test/deep/dark/woods.deep
haredo test/deep/dark/woods.deep (done)
haredo test/should-fail
haredo test/should-fail (error: exited with status 1)
haredo test/unwriteable
haredo test/unwriteable (done)
should've failed
haredo test (error: exited with status 1)
Maybe this should be done first, like so:
touch $3
chmod -w $3
echo "this target is unwriteable so this test should fail" > $3
In this order at least I get indeed an unwritable error:
...
haredo test/clean-gen (done)
haredo test/deep/dark/woods.deep
haredo test/deep/dark/woods.deep (done)
haredo test/should-fail
haredo test/should-fail (error: exited with status 1)
haredo test/unwriteable
/home/rx/tmp/haredo2/test/unwriteable.do: 17: cannot create /tmp/d0d181f1d215ef70/bea6ce141ecd41838afaa8749cb8ce94: Permission denied
haredo test/unwriteable (error: exited with status 2)
haredo test/child-fails
haredo should-fail
haredo should-fail (error: exited with status 1)
haredo test/child-fails (child failed)
haredo test (done)
Not sure, really.
Thanks,
A
Autumn! <autumnull@posteo.net> writes:
>> I would like to look into this uwritable test some time - but now I am getting>> another error when building (bootstrapping) haredo:> more stdlib updates happened since i fixed it lol. should now be fixed> upstream.>> ~Autumn