Skip to content

Commit 63153b6

Browse files
committed
♻️ Synced AM 📦 <-- [Added AM Archlinux test container and some test fixes. (#2306)] ⌚
1 parent 4bdbc3e commit 63153b6

8 files changed

Lines changed: 77 additions & 49 deletions

File tree

.github/CACHE_LIST.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,7 @@ cudatext
568568
cura
569569
cura-beta
570570
curlie
571+
curseforge
571572
cursor
572573
cursor-cli
573574
customrpc

.github/LATEST.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
f9aedd1cf5206fe8e209153112b851524678d5a3
1+
3d887dc663a1a98c452f18855a756fd33f3dd74c

.github/PKGS.json

Lines changed: 32 additions & 32 deletions
Large diffs are not rendered by default.

regress/am-arch.dockerfile

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
## To run this image using podman:
2+
## 1. podman build -t am-arch -f am-arch.dockerfile
3+
## 2. podman run -it --device /dev/fuse --cap-add SYS_ADMIN --security-opt unmask=ALL --tmpfs /opt --tmpfs /root/.local/share/applications am-arch:latest
4+
5+
# Use the official Arch image as a parent image
6+
FROM archlinux:latest
7+
8+
# Install dependencies and AM
9+
RUN pacman-key --init && pacman -Sy && pacman -Su --noconfirm sudo wget curl less git glibc fuse3 file unzip xz
10+
RUN cd && wget https://raw.githubusercontent.com/pkgforge-community/AM-HF-SYNC/main/INSTALL && chmod a+x ./INSTALL && sudo ./INSTALL && rm ./INSTALL
11+
12+
# Copy regression folder
13+
RUN cd && git clone --depth 1 https://github.com/pkgforge-community/AM-HF-SYNC && mv AM/regress . && rm -rf AM
14+
15+
# Setup locale
16+
RUN echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
17+
RUN locale-gen && echo "LANG=en_US.UTF-8" > /etc/locale.conf
18+
19+
# Setup AM with safe defaults
20+
RUN printf "y\n\n" | am --user && am --system && am --disable-notifications
21+
22+
# Setup env
23+
RUN echo "export LC_ALL=en_US.UTF-8" >> ~/.bashrc
24+
RUN echo "export PATH=$PATH:/root/.local/bin" >> ~/.bashrc
25+
RUN echo "echo AM-Arch testing container started" >> ~/.bashrc
26+
WORKDIR /root/regress
27+
CMD ["/bin/bash"]

regress/am-debian.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
FROM debian:latest
77

88
# Install dependencies and AM
9-
RUN apt update && apt full-upgrade -y && apt install -y sudo wget curl git fuse3 bsdextrautils file locales unzip
9+
RUN apt update && apt full-upgrade -y && apt install -y sudo wget curl git fuse3 bsdextrautils file locales unzip xz-utils
1010
RUN cd && wget https://raw.githubusercontent.com/pkgforge-community/AM-HF-SYNC/main/INSTALL && chmod a+x ./INSTALL && sudo ./INSTALL && rm ./INSTALL
1111

1212
# Copy regression folder

regress/am-ubuntu.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
FROM ubuntu:latest
77

88
# Install dependencies and AM
9-
RUN apt update && apt full-upgrade -y && apt install -y sudo wget curl git fuse3 bsdextrautils file locales unzip
9+
RUN apt update && apt full-upgrade -y && apt install -y sudo wget curl git fuse3 bsdextrautils file locales unzip xz-utils
1010
RUN cd && wget https://raw.githubusercontent.com/pkgforge-community/AM-HF-SYNC/main/INSTALL && chmod a+x ./INSTALL && sudo ./INSTALL && rm ./INSTALL
1111

1212
# Copy regression folder

regress/test-am-clone.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ app_name3=$(_pick_random_app "$TEST_APP_LIST_NOCHK")
1111

1212
## Setup
1313
_log "Running clone install list test: $0"
14-
rm -f ~/Desktop/am-clone.source
14+
rm -f ~/Desktop/am-clone.source am-clone.source
1515
_remove_all_apps
1616

1717
# Install in System Mode
@@ -36,19 +36,19 @@ _check_count "$app_name3.*|" 2 "$test_results"
3636
# Hide/lock apps to complicate clone process
3737
printf "y\n" |\
3838
am --user
39-
am hide $app_name1
39+
am hide "$app_name1"
4040
printf "y\n" |\
41-
am lock $app_name2
41+
am lock "$app_name2"
4242
am --system
4343
printf "1\n" |\
44-
am hide $app_name2
44+
am hide "$app_name2"
4545
printf "1\ny\n" |\
46-
am lock $app_name3
46+
am lock "$app_name3"
4747

4848
# Create cloned app list and check if it exists
4949
_log "Create app list (am clone)..."
5050
am clone
51-
ls ~/Desktop > "$test_results"
51+
ls ~/Desktop . > "$test_results"
5252
_check_count "am-clone.source" 1 "$test_results"
5353

5454
# Remove all apps and and then reinstall them (clone previous setup)

regress/test-common.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ TEST_APP_LIST_ZIP="clifm gotimer dra nyan navi lsd hyperfine fcp"
1616
TEST_APP_LIST_NOCHK="bench-cli helio appimagen crabfetch colorstatic-bash"
1717

1818
# List of test apps that are outdated (REQUIREMENTS: Under 10MB, simple install script)
19-
TEST_APP_LIST_OLD="aisap bench-cli colorstatic-bash fcp"
19+
TEST_APP_LIST_OLD="aisap bench-cli colorstatic-bash"
2020

2121
# List of test apps that can be downgraded (REQUIREMENTS: Under 5MB, simple install script)
2222
TEST_APP_LIST_DOWN="clifm aisap fcp zsync2"
@@ -60,23 +60,23 @@ _remove_item() {
6060

6161
# Message log function
6262
_log() {
63-
echo "\033[1;34m$1\033[0m"
64-
echo "$1" >> "$TEST_LOG"
63+
printf "\033[1;34m%b\033[0m\n" "$1"
64+
printf "%b\n" "$1" >> "$TEST_LOG"
6565
}
6666

6767
# Test fail log function
6868
_fail() {
69-
echo "\033[0;31m$1\033[0m\n"
70-
echo "$1" >> "$TEST_LOG"
71-
echo "Test failed!\n" >> "$TEST_LOG"
69+
printf "\033[0;31m%b\033[0m\n" "$1"
70+
printf "%b\n" "$1" >> "$TEST_LOG"
71+
printf "%s\n\n" "Test failed!" >> "$TEST_LOG"
7272
exit 1
7373
}
7474

7575
# Test pass log function
7676
_pass() {
7777
PASS_MSG="Test passed!"
78-
echo "\033[0;32m$PASS_MSG\033[0m\n"
79-
echo "$PASS_MSG\n" >> "$TEST_LOG"
78+
printf "\033[0;32m%s\033[0m\n\n" "$PASS_MSG"
79+
printf "%s\n\n" "$PASS_MSG" >> "$TEST_LOG"
8080
exit 0
8181
}
8282

0 commit comments

Comments
 (0)