Remove FUSE dependency

This commit is contained in:
Matt Borgerson 2022-02-08 03:05:13 -07:00
parent 06452f4d88
commit c9516d3abb
3 changed files with 13 additions and 15 deletions

View File

@ -1,26 +1,25 @@
FROM ubuntu:20.04
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qy fuse build-essential pkg-config libfuse-dev cmake git
RUN mkdir -p /usr/src \
&& git clone https://github.com/mborgerson/fatx.git /usr/src/fatx
WORKDIR /usr/src/fatx
RUN mkdir build \
&& cd build \
&& cmake .. \
&& make DESTDIR=/fatx install
&& DEBIAN_FRONTEND=noninteractive \
apt-get install -qy \
build-essential cmake git python3-pip
RUN git clone --depth=1 https://github.com/mborgerson/fatx \
&& cd fatx \
&& mkdir -p /whl \
&& python3 -m pip wheel -w /whl .
FROM ubuntu:20.04
RUN set -xe; \
apt-get -qy update \
&& DEBIAN_FRONTEND=noninteractive \
apt-get -qy install \
python3-pip \
xvfb \
x11-utils \
x11vnc \
xinit \
ffmpeg \
i3 \
fuse \
qemu-utils \
libc6 \
libepoxy0 \
@ -38,8 +37,8 @@ RUN set -xe; \
cpu-checker \
;
COPY --from=0 /fatx /fatx
RUN cp -ruT /fatx / && rm -rf /fatx
COPY --from=0 /whl /whl
RUN python3 -m pip install --find-links /whl /whl/pyfatx-*.whl
ENV SDL_AUDIODRIVER=disk
ENV SDL_DISKAUDIOFILE=/dev/null

View File

@ -30,7 +30,6 @@ docker pull ghcr.io/mborgerson/xemu-test:master
echo "[*] Running tests"
rm -rf results
mkdir results
docker run --rm -p 5900:5900 -v $PWD:/work -w /work --device /dev/fuse \
--privileged \
docker run --rm -p 5900:5900 -v $PWD:/work -w /work \
ghcr.io/mborgerson/xemu-test:master \
python3 test_main.py 2>&1 | tee results/log.txt

View File

@ -74,7 +74,7 @@ class Test:
def mount_hdd(self):
_l.info('Mounting HDD image')
os.makedirs(self.mount_path, exist_ok=True)
subprocess.run(f'fatxfs {self.hdd_path} {self.mount_path}'.split(), check=True)
subprocess.run(f'python3 -m pyfatx -x {self.hdd_path}'.split(), check=True, cwd=self.mount_path)
def copy_results(self):
_l.info('Copying test results...')
@ -82,7 +82,7 @@ class Test:
def unmount_hdd(self):
_l.info('Unmounting HDD image')
subprocess.run(f'fusermount -u {self.mount_path}'.split())
# Nothing to do
def analyze_results(self):
with open(os.path.join(self.results_out_path, 'results.txt')) as f: