Re: [hatari-devel] build test fails for macos on cirrus ci |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- To: hatari-devel@xxxxxxxxxxxxxxxxxxx, Chris Jenkins <cdpjenkins@xxxxxxxxx>
- Subject: Re: [hatari-devel] build test fails for macos on cirrus ci
- From: Thomas Huth <th.huth@xxxxxxxxx>
- Date: Thu, 2 Jun 2022 10:08:01 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1654164483; bh=dyaaiK41FsxxMfTqxEZNLTRHfVfUrzQqgXwiHeipukU=; h=Date:Subject:To:From:From; b=Guh8UtwQC55dqBaYSq+gsqso2fhHXtsPV/ojVxc/tSsIvJKORAsO4NZLYHyP0IJTP Sz/eINMZrAMJGlHkzzNm4OFlTjhcVuapQ3CwERSzRFlKERpTVaXO78Wfx6DhVxPce7 EfOF+H1Z8YOFgJjvZJv2RhFViSWjnc+CVLzvh5TzuZJKVn7gMPpZtrP77RUBEmnJDW IQcn6CNBHy+q7csjgbopVncdZKNcg2hFarf3L8zj3PmwYXuek2yFhP0EFcV/kJ2j4t 5+1N93Ls7fKHT9KcIL/GYe2wSBRTutorjgDHhfW2pCJunxc8SlQjbSq4bmCBCU8h8y Dv3zafdmZ2Jjw==
On 02/06/2022 11.57, Chris Jenkins wrote:
....
If I ls the contents of $testdir then I see the following:
$ ls /var/folders/kk/xv3dmf2n31vb5hvlh65f7cmc0000gp/T/tmp.VLDfkT9d/
grab0001.pnghatari.nvramout.txttestmem.sav
So it has successfully saved the screenshot and the memory snapshot but it
has silently failed to save the audio recording sndrec.wav and the video
recording videorec.avi. These two files are specified in the temporary
hatari.cfg that is created by the script so I'm wondering if the problem is
caused by Hatari failing to correctly read and use the config. I'll try to
find some time to investigate that next.
How does that sound and do you have any other suggestions for things I can
look at?
I think you're on the right track here. The cmdfifo test saves the config
to "$testdir/.config/hatari/hatari.cfg" and then runs Hatari with
HOME="$testdir" so that Hatari "should" find it's config file in
~/.config/hatari/hatari.cfg ... however, that does not work on macOS,
if you look at src/paths.c, you can see:
#if defined(__MACOSX__)
#define HATARI_HOME_DIR "Library/Application Support/Hatari"
#elif defined(WIN32)
#define HATARI_HOME_DIR "AppData\\Local\\Hatari"
#else
#define HATARI_HOME_DIR ".config/hatari"
#endif
thus the HATARI_HOME_DIR is in another location here.
I don't have any time for testing right now (sorry), but if you have got
some spare minutes, could you please check if this fixes the issue:
diff --git a/tests/cmdfifo.sh b/tests/cmdfifo.sh
index 3de58d4d..8cbe7913 100755
--- a/tests/cmdfifo.sh
+++ b/tests/cmdfifo.sh
@@ -23,7 +23,7 @@ trap remove_temp EXIT
mkdir -p "$testdir/.config/hatari"
-cat > "$testdir/.config/hatari/hatari.cfg" <<EOF
+cat > "$testdir/hatari.cfg" <<EOF
[Sound]
szYMCaptureFileName=$testdir/sndrec.wav
@@ -37,7 +37,8 @@ export SDL_AUDIODRIVER=dummy
unset TERM
HOME="$testdir" $hatari --confirm-quit false --screenshot-dir "$testdir" \
- --tos none --cmd-fifo "$cmdfifo" $* > "$testdir/out.txt" 2>&1 &
+ -c "$testdir/hatari.cfg" --tos none --cmd-fifo "$cmdfifo" $* \
+ > "$testdir/out.txt" 2>&1 &
hatari_pid=$!
# Wait until the fifo has been created by Hatari
.... this will load the config file via the "-c" parameter of Hatari
instead of silently assuming that the config file should be in a certain
location.
Thomas