mirror of
https://github.com/libratbag/piper.git
synced 2026-05-19 04:16:08 -04:00
data: add two tests that files are in git and added to meson
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
26
data/check-files-in-git.sh
Normal file
26
data/check-files-in-git.sh
Normal file
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Usage: check-files-in-git.sh /path/to/piper/
|
||||
|
||||
if [ -z "$top_srcdir" ]; then
|
||||
top_srcdir="$1"
|
||||
fi
|
||||
if [ -z "$top_srcdir" ]; then
|
||||
echo "Usage: `basename $0` /path/to/piper"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export GIT_DIR="$top_srcdir/.git";
|
||||
if ! git ls-files >& /dev/null; then
|
||||
echo "Not a git tree. Skipping"
|
||||
exit 77
|
||||
fi
|
||||
|
||||
pushd "$top_srcdir" > /dev/null
|
||||
for file in data/svgs/*.svg; do
|
||||
git ls-files --error-unmatch "$file" &> /dev/null || (
|
||||
echo "ERROR: File $file is not in git" && test);
|
||||
rc="$(($rc + $?))";
|
||||
done
|
||||
popd > /dev/null
|
||||
exit $rc
|
||||
5
data/check-svg-in-meson.build.sh
Executable file
5
data/check-svg-in-meson.build.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
pushd "$1" > /dev/null
|
||||
diff -u1 <(grep -o 'svgs/.*\.svg' data/meson.build) <(cd data; ls -v svgs/*.svg)
|
||||
popd > /dev/null
|
||||
@@ -41,31 +41,31 @@ i18n.merge_file(input: appdata,
|
||||
|
||||
svgs = [
|
||||
'svgs/fallback.svg',
|
||||
'svgs/logitech-g9.svg',
|
||||
'svgs/logitech-g102-g203.svg',
|
||||
'svgs/logitech-g300.svg',
|
||||
'svgs/logitech-g303.svg',
|
||||
'svgs/logitech-g402.svg',
|
||||
'svgs/logitech-g403.svg',
|
||||
'svgs/logitech-g500s.svg',
|
||||
'svgs/logitech-g500.svg',
|
||||
'svgs/logitech-g500s.svg',
|
||||
'svgs/logitech-g502.svg',
|
||||
'svgs/logitech-g600.svg',
|
||||
'svgs/logitech-g603.svg',
|
||||
'svgs/logitech-g700.svg',
|
||||
'svgs/logitech-g703.svg',
|
||||
'svgs/logitech-g900.svg',
|
||||
'svgs/logitech-g9.svg',
|
||||
'svgs/logitech-g-pro.svg',
|
||||
'svgs/logitech-g-pro-wireless.svg',
|
||||
'svgs/logitech-mx-anywhere2s.svg',
|
||||
'svgs/logitech-mx-anywhere2.svg',
|
||||
'svgs/logitech-mx-master-2s.svg',
|
||||
'svgs/logitech-mx-anywhere2s.svg',
|
||||
'svgs/logitech-mx-master.svg',
|
||||
'svgs/logitech-mx-master-2s.svg',
|
||||
'svgs/roccat-kone-xtd.svg',
|
||||
'svgs/steelseries-kinzu-v2.svg',
|
||||
'svgs/steelseries-rival.svg',
|
||||
'svgs/steelseries-rival310.svg',
|
||||
'svgs/steelseries-rival600.svg',
|
||||
'svgs/steelseries-rival.svg',
|
||||
'svgs/steelseries-sensei310.svg',
|
||||
'svgs/steelseries-senseiraw.svg',
|
||||
]
|
||||
@@ -83,7 +83,18 @@ test('svg-lookup-check',
|
||||
svg_mapping,
|
||||
join_paths(meson.source_root(), 'data/svgs/')
|
||||
],
|
||||
|
||||
)
|
||||
# meson requires that we specify all files one-by-one, so let's add a test
|
||||
# that we can't forget about that.
|
||||
test('svg-files-in-meson.build',
|
||||
find_program('check-svg-in-meson.build.sh'),
|
||||
args: [meson.source_root()],
|
||||
suite: ['all'])
|
||||
test('files-in-git',
|
||||
find_program('check-files-in-git.sh'),
|
||||
args: [meson.source_root()],
|
||||
suite: ['all'])
|
||||
|
||||
gresource = configure_file(input: 'piper.gresource.xml.in',
|
||||
output: 'piper.gresource.xml',
|
||||
|
||||
Reference in New Issue
Block a user