Publish tool cleanup and Framework monitoring refinements
This commit is contained in:
@@ -7,15 +7,11 @@ set -euo pipefail
|
||||
repo_root=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd)
|
||||
tool_dir="$repo_root/fedora-tools-settings"
|
||||
topdir="$repo_root/rpmbuild"
|
||||
source_dir="$topdir/SOURCES/fedora-tools-settings-0.1.0"
|
||||
|
||||
mkdir -p "$topdir"/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS}
|
||||
rm -rf -- "$source_dir"
|
||||
mkdir -p "$source_dir"
|
||||
cp -a "$tool_dir/CMakeLists.txt" "$tool_dir/src" "$tool_dir/tests" "$source_dir/"
|
||||
tar -C "$topdir/SOURCES" -czf \
|
||||
tar -C "$tool_dir" --transform='s,^,fedora-tools-settings-0.1.0/,' -czf \
|
||||
"$topdir/SOURCES/fedora-tools-settings-0.1.0.tar.gz" \
|
||||
fedora-tools-settings-0.1.0
|
||||
CMakeLists.txt src tests
|
||||
install -m 0644 "$repo_root/LICENSE" "$topdir/SOURCES/LICENSE"
|
||||
install -m 0644 "$tool_dir/README.md" "$topdir/SOURCES/README.md"
|
||||
|
||||
|
||||
@@ -7,39 +7,14 @@ set -euo pipefail
|
||||
repo_root=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd)
|
||||
tool_dir="$repo_root/plasma-task-group-shortcuts"
|
||||
topdir="$repo_root/rpmbuild"
|
||||
source_dir="$topdir/SOURCES/plasma-task-group-shortcuts-0.1.0"
|
||||
|
||||
mkdir -p "$topdir"/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS}
|
||||
mkdir -p "$source_dir/tests"
|
||||
install -m 0644 "$tool_dir/CMakeLists.txt" "$source_dir/CMakeLists.txt"
|
||||
install -m 0644 "$tool_dir/keyboardlayout.cpp" "$source_dir/keyboardlayout.cpp"
|
||||
install -m 0644 "$tool_dir/keyboardlayout.h" "$source_dir/keyboardlayout.h"
|
||||
install -m 0644 "$tool_dir/main.cpp" "$source_dir/main.cpp"
|
||||
install -m 0644 "$tool_dir/pendingselection.cpp" "$source_dir/pendingselection.cpp"
|
||||
install -m 0644 "$tool_dir/pendingselection.h" "$source_dir/pendingselection.h"
|
||||
install -m 0644 "$tool_dir/windowpreview.cpp" "$source_dir/windowpreview.cpp"
|
||||
install -m 0644 "$tool_dir/windowpreview.h" "$source_dir/windowpreview.h"
|
||||
install -m 0644 "$tool_dir/Preview.qml" "$source_dir/Preview.qml"
|
||||
install -m 0644 "$tool_dir/TaskbarGeometry.qml" "$source_dir/TaskbarGeometry.qml"
|
||||
install -m 0644 "$tool_dir/taskbargeometry.cpp" "$source_dir/taskbargeometry.cpp"
|
||||
install -m 0644 "$tool_dir/taskbargeometry.h" "$source_dir/taskbargeometry.h"
|
||||
install -m 0644 "$tool_dir/previewplacement.cpp" "$source_dir/previewplacement.cpp"
|
||||
install -m 0644 "$tool_dir/previewplacement.h" "$source_dir/previewplacement.h"
|
||||
install -m 0644 "$tool_dir/tests/test-pendingselection.cpp" "$source_dir/tests/test-pendingselection.cpp"
|
||||
install -m 0644 "$tool_dir/tests/test-preview.cpp" "$source_dir/tests/test-preview.cpp"
|
||||
install -m 0644 "$tool_dir/taskselection.cpp" "$source_dir/taskselection.cpp"
|
||||
install -m 0644 "$tool_dir/taskselection.h" "$source_dir/taskselection.h"
|
||||
install -m 0644 "$tool_dir/tests/test-taskselection.cpp" \
|
||||
"$source_dir/tests/test-taskselection.cpp"
|
||||
install -m 0644 "$tool_dir/tests/test-keyboardlayout.cpp" \
|
||||
"$source_dir/tests/test-keyboardlayout.cpp"
|
||||
install -m 0644 "$tool_dir/se.ajpanton.plasma-task-group-shortcuts.desktop" \
|
||||
"$source_dir/se.ajpanton.plasma-task-group-shortcuts.desktop"
|
||||
install -m 0644 "$tool_dir/se.ajpanton.plasma-task-group-shortcuts-autostart.desktop" \
|
||||
"$source_dir/se.ajpanton.plasma-task-group-shortcuts-autostart.desktop"
|
||||
tar -C "$topdir/SOURCES" -czf \
|
||||
"$topdir/SOURCES/plasma-task-group-shortcuts-0.1.0.tar.gz" \
|
||||
plasma-task-group-shortcuts-0.1.0
|
||||
(
|
||||
cd -- "$tool_dir"
|
||||
tar --transform='s,^,plasma-task-group-shortcuts-0.1.0/,' \
|
||||
-czf "$topdir/SOURCES/plasma-task-group-shortcuts-0.1.0.tar.gz" \
|
||||
CMakeLists.txt *.cpp *.h *.qml *.desktop tests
|
||||
)
|
||||
install -m 0644 "$repo_root/LICENSE" "$topdir/SOURCES/LICENSE"
|
||||
install -m 0644 "$repo_root/README.md" "$topdir/SOURCES/README.md"
|
||||
|
||||
|
||||
Executable
+29
@@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env bash
|
||||
# SPDX-License-Identifier: MIT
|
||||
# Requires the Fedora build dependencies for all seven tools; never installs them.
|
||||
set -euo pipefail
|
||||
repo_root=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd)
|
||||
build_dir=${FEDORA_TOOLS_TEST_BUILD_DIR:-"$repo_root/local/test-build"}
|
||||
cd -- "$repo_root"
|
||||
for script in scripts/*; do
|
||||
if [[ -f $script ]]; then bash -n "$script"; fi
|
||||
done
|
||||
bash scripts/tests/test-source-archives
|
||||
|
||||
plugin=touchpad-hold-tap/90-touchpad-hold-tap.lua
|
||||
lua touchpad-hold-tap/tests/test-touchpad-hold-tap.lua "$plugin"
|
||||
lua touchpad-hold-tap/tests/test-touchpad-hold-tap.lua "$plugin" KEY_F13
|
||||
lua touchpad-hold-tap/tests/test-touchpad-hold-tap.lua "$plugin" BTN_MIDDLE allow-moving-anchor
|
||||
bash touchpad-hold-tap/tests/test-touchpad-hold-tap-config "$plugin" touchpad-hold-tap/touchpad-hold-tap-config
|
||||
bash plasma-always-show-unlock/tests/test-plasma-always-show-unlock \
|
||||
plasma-always-show-unlock/plasma-always-show-unlock \
|
||||
plasma-always-show-unlock/LockScreenUi.patch plasma-always-show-unlock/tests/LockScreenUi.qml
|
||||
bash plasma-fingerprint-workaround/tests/test-controller \
|
||||
plasma-fingerprint-workaround/plasma-fingerprint-workaround plasma-fingerprint-workaround/payload.conf
|
||||
|
||||
for tool in plasma-task-group-shortcuts plasma-panel-actions fedora-tools-settings framework-laptop-tools; do
|
||||
cmake -S "$tool" -B "$build_dir/$tool" -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
cmake --build "$build_dir/$tool" --parallel "${CMAKE_BUILD_PARALLEL_LEVEL:-2}"
|
||||
QT_QPA_PLATFORM=offscreen QT_QUICK_BACKEND=software \
|
||||
ctest --test-dir "$build_dir/$tool" --output-on-failure
|
||||
done
|
||||
@@ -0,0 +1,41 @@
|
||||
#!/usr/bin/env bash
|
||||
# SPDX-License-Identifier: MIT
|
||||
set -euo pipefail
|
||||
repo_root=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/../.." && pwd)
|
||||
work=$(mktemp -d)
|
||||
trap 'rm -rf -- "$work"' EXIT
|
||||
mkdir -p "$work/repo/scripts" "$work/bin"
|
||||
cp "$repo_root/LICENSE" "$repo_root/README.md" "$work/repo/"
|
||||
# Exercise source preparation, without building or installing RPMs.
|
||||
printf '#!/bin/sh\nexit 0\n' > "$work/bin/rpmbuild"
|
||||
chmod +x "$work/bin/rpmbuild"
|
||||
export PATH="$work/bin:$PATH"
|
||||
|
||||
for tool in plasma-task-group-shortcuts fedora-tools-settings; do
|
||||
cp -a "$repo_root/$tool" "$work/repo/"
|
||||
cp "$repo_root/scripts/build-$tool-rpm" "$work/repo/scripts/"
|
||||
source_dir="$work/repo/rpmbuild/SOURCES/$tool-0.1.0"
|
||||
mkdir -p "$source_dir"
|
||||
touch "$source_dir/obsolete.cpp"
|
||||
bash "$work/repo/scripts/build-$tool-rpm"
|
||||
archive="$work/repo/rpmbuild/SOURCES/$tool-0.1.0.tar.gz"
|
||||
files=$(tar -tzf "$archive")
|
||||
if [[ $files == *obsolete.cpp* ]]; then
|
||||
printf 'Stale source included in %s\n' "$archive" >&2
|
||||
exit 1
|
||||
fi
|
||||
mkdir -p "$work/extracted/$tool"
|
||||
tar -xzf "$archive" -C "$work/extracted/$tool"
|
||||
extracted="$work/extracted/$tool/$tool-0.1.0"
|
||||
cmp "$work/repo/$tool/CMakeLists.txt" "$extracted/CMakeLists.txt"
|
||||
diff -r "$work/repo/$tool/tests" "$extracted/tests"
|
||||
if [[ $tool == fedora-tools-settings ]]; then
|
||||
diff -r "$work/repo/$tool/src" "$extracted/src"
|
||||
else
|
||||
for source in "$work/repo/$tool/"*.cpp "$work/repo/$tool/"*.h \
|
||||
"$work/repo/$tool/"*.qml "$work/repo/$tool/"*.desktop; do
|
||||
cmp "$source" "$extracted/${source##*/}"
|
||||
done
|
||||
fi
|
||||
done
|
||||
printf 'Source archive tests passed.\n'
|
||||
Reference in New Issue
Block a user