Skip to content

Commit 42af702

Browse files
committed
Added test to make sure libfaketime is working.
1 parent 298c9ae commit 42af702

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

.github/workflows/LuaWatcom.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,27 @@ jobs:
1515
- name: Install Tools
1616
run: |
1717
sudo apt-get update
18-
sudo apt-get install -y faketime gcc libreadline-dev lua5.4 make mtools zip
18+
sudo apt-get install -y gcc libfaketime libreadline-dev lua5.4 make mtools zip
1919
2020
- uses: actions/checkout@v4
2121
with:
2222
submodules: recursive
2323
fetch-depth: 0
2424

25+
- name: Test libfaketime works
26+
run: |
27+
export FAKETIME=$(TZ=UTC0 git show --quiet --date='format-local:%Y-%m-%d %H:%M:%S' --format="%cd")
28+
export LD_PRELOAD=$(dpkg -L libfaketime | grep libfaketime.so.1)
29+
DATE=$(date -Is)
30+
echo "Date: $DATE"
31+
echo "Faketime: $FAKETIME"
32+
echo "ld-preload: $LD_PRELOAD"
33+
if [ "$FAKETIME" == "$DATE" ]; then
34+
false
35+
else
36+
true
37+
fi
38+
2539
- name: Test Lua Core Demo Scripts function
2640
run: |
2741
lua demo/core/README.LUA

0 commit comments

Comments
 (0)