Skip to content

Commit ca149d0

Browse files
committed
docs to arch
1 parent 81ac7bb commit ca149d0

File tree

3 files changed

+13
-52
lines changed

3 files changed

+13
-52
lines changed

src/docs/.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ RUN pacman -Syu --noconfirm && \
77
texlive \
88
python-pipx
99

10-
RUN pipx install nbdev
1110

1211
USER arch
12+
RUN pipx install nbdev
1313
RUN echo y | LANG=C yay -S --provides=false --answerdiff None --answerclean None --mflags "--noconfirm" quarto-cli-bin

src/docs/test-project/test-utils.sh

Lines changed: 11 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22
SCRIPT_FOLDER="$(cd "$(dirname $0)" && pwd)"
3-
USERNAME=${1:-vscode}
3+
USERNAME=${1:-arch}
44

55
if [ -z $HOME ]; then
66
HOME="/root"
@@ -51,7 +51,7 @@ checkOSPackages() {
5151
LABEL=$1
5252
shift
5353
echo -e "\n🧪 Testing $LABEL"
54-
if dpkg-query --show -f='${Package}: ${Version}\n' "$@"; then
54+
if pacman -Qq "$@"; then
5555
echo "✅ Passed!"
5656
return 0
5757
else
@@ -61,58 +61,25 @@ checkOSPackages() {
6161
fi
6262
}
6363

64-
checkExtension() {
65-
# Happens asynchronusly, so keep retrying 10 times with an increasing delay
66-
EXTN_ID="$1"
67-
TIMEOUT_SECONDS="${2:-10}"
68-
RETRY_COUNT=0
69-
echo -e -n "\n🧪 Looking for extension $1 for maximum of ${TIMEOUT_SECONDS}s"
70-
until [ "${RETRY_COUNT}" -eq "${TIMEOUT_SECONDS}" ] || \
71-
[ ! -e $HOME/.vscode-server/extensions/${EXTN_ID}* ] || \
72-
[ ! -e $HOME/.vscode-server-insiders/extensions/${EXTN_ID}* ] || \
73-
[ ! -e $HOME/.vscode-test-server/extensions/${EXTN_ID}* ] || \
74-
[ ! -e $HOME/.vscode-remote/extensions/${EXTN_ID}* ]
75-
do
76-
sleep 1s
77-
(( RETRY_COUNT++ ))
78-
echo -n "."
79-
done
80-
81-
if [ ${RETRY_COUNT} -lt ${TIMEOUT_SECONDS} ]; then
82-
echo -e "\n✅ Passed!"
83-
return 0
84-
else
85-
echoStderr -e "\n❌ Extension $EXTN_ID not found."
86-
FAILED+=("$LABEL")
87-
return 1
88-
fi
89-
}
9064

9165
checkCommon()
9266
{
93-
PACKAGE_LIST="apt-utils \
67+
PACKAGE_LIST="\
9468
git \
95-
openssh-client \
69+
openssh \
9670
less \
9771
iproute2 \
9872
procps \
73+
neofetch \
74+
ripgrep \
75+
fd \
76+
lazygit \
9977
curl \
10078
wget \
10179
unzip \
102-
nano \
10380
jq \
104-
lsb-release \
105-
ca-certificates \
106-
apt-transport-https \
107-
dialog \
108-
gnupg2 \
109-
libc6 \
110-
libgcc1 \
111-
libgssapi-krb5-2 \
112-
liblttng-ust1 \
113-
libstdc++6 \
114-
zlib1g \
115-
locales \
81+
texlive-xetex \
82+
quarto-cli-bin \
11683
sudo"
11784

11885
# Actual tests
@@ -121,12 +88,6 @@ checkCommon()
12188
check "locale" [ $(locale -a | grep en_US.utf8) ]
12289
check "sudo" sudo echo "sudo works."
12390
check "login-shell-path" [ -f "/etc/profile.d/00-restore-env.sh" ]
124-
check "code" which code
125-
check "rcm" which lsrc
126-
check "xelatex" xelatex --version
127-
check "quarto" quarto --version
128-
check "nbdev" nbdev_help
129-
check "pre-commit" pre-commit -V
13091
}
13192

13293
reportResults() {
@@ -148,4 +109,4 @@ fixTestProjectFolderPrivs() {
148109
sudo chown -R ${USERNAME} "${TEST_PROJECT_FOLDER}"
149110
fi
150111
fi
151-
}
112+
}

src/docs/test-project/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
cd $(dirname "$0")
33

4-
source test-utils.sh vscode
4+
source test-utils.sh arch
55

66
# Run common tests
77
checkCommon

0 commit comments

Comments
 (0)