-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
228 additions
and
181 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
* | ||
!docker/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,8 @@ An expensive and over-engineered approach to storing ROMs and their metadata whi | |
$ curl -sSL https://raw.githubusercontent.com/seriema/retro-cloud/master/raspberry-pi/download-and-run.sh | bash | ||
# Or this shortened URL: | ||
$ curl -sSL https://tiny.cc/retro-cloud-setup | bash | ||
# Or get the latest development version: | ||
$ curl -sSL https://tiny.cc/rc-rpi | bash | ||
``` | ||
|
||
> **NOTE!** You will be prompted to log into your Azure account. The script pauses with the message: | ||
|
@@ -39,6 +41,8 @@ An expensive and over-engineered approach to storing ROMs and their metadata whi | |
$ curl -sSL https://raw.githubusercontent.com/seriema/retro-cloud/master/virtual-machine/setup.sh | bash | ||
# Or this shortened URL: | ||
$ curl -sSL https://tiny.cc/retro-cloud-setup-vm | bash | ||
# Or get the latest development version: | ||
$ curl -sSL https://tiny.cc/rc-vm | bash | ||
``` | ||
|
||
1. Copy ROMs to Azure File Share. Alternatives: | ||
|
@@ -63,6 +67,8 @@ An expensive and over-engineered approach to storing ROMs and their metadata whi | |
* `git clone [email protected]:seriema/retro-cloud.git && cd retro-cloud && git checkout develop` | ||
* Testing | ||
* `docker run --privileged -it --rm seriema/retro-cloud:develop` | ||
* `docker/compose/run_tests.sh` | ||
* `docker-compose -f docker-compose.test.yml up` | ||
* Docker | ||
* `docker build -t seriema/retro-cloud:amd64 .` | ||
* `docker push seriema/retro-cloud:amd64` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
sut: | ||
build: . | ||
working_dir: /home/pi/retro-cloud-test | ||
volumes: | ||
- ./docker/compose:/home/pi/retro-cloud-test/docker/compose | ||
command: bash docker/compose/run_tests.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/bash | ||
|
||
# Abort on error, error if variable is unset, and enable debug output | ||
set -eux | ||
|
||
echo 'Verify number of roms folders. There is one for each successful emultator installed.' | ||
# Added when RetroPie-Setup was failing silently and not installing all emulators. | ||
# Note: Export a new list with: $ ls -m ~/RetroPie/roms | ||
if [[ $(uname -m) = 'armv7l' ]]; then | ||
emulators="amiga, amstradcpc, arcade, atari2600, atari5200, atari7800, atari800, atarilynx, fba, fds, gamegear, gb, gba, gbc, genesis, mame-libretro, mame-mame4all, mastersystem, megadrive, n64, neogeo, nes, ngp, ngpc, pcengine, psx, sega32x, segacd, sg-1000, snes, vectrex, zxspectrum"; | ||
else | ||
# Two emulators aren't available on amd64: mame-mame4all, amiga | ||
emulators="amstradcpc, arcade, atari2600, atari5200, atari7800, atari800, atarilynx, fba, fds, gamegear, gb, gba, gbc, genesis, mame-libretro, mastersystem, megadrive, n64, neogeo, nes, ngp, ngpc, pcengine, psx, sega32x, segacd, sg-1000, snes, vectrex, zxspectrum"; | ||
fi | ||
[[ -z $(echo $(echo $emulators | tr ',' '\n') $(ls -1 ~/RetroPie/roms) | tr ' ' '\n' | sort | uniq -u) ]] | ||
|
||
echo 'Verify that there are no builds left. There is one for each failed build.' | ||
# Added when RetroPie-Setup was failing silently and not installing all emulators. | ||
[[ -z $(find /home/pi/RetroPie-Setup/tmp/build -maxdepth 3 -type f) ]] | ||
|
||
echo 'Verify that line endings of all files are LF. Windows uses CRLF which can get copied over by Docker ADD/COPY.' | ||
# Added when running the container would throw '\r' parse errors when the users bash profile. Despite | ||
# .gitattribute set to checkout all files in docker/rpi as LF it could still check them out as CRLF, | ||
# and Docker has a tendency to use the host line endings when copying files. | ||
# Note: The Dockerfile no longer copies bash files because COPY constantly invalidates the cache, forcing | ||
# unnecessary rebuilds that take 30-60 minutes locally and 2-3 hours on Docker Hub. The test is kept | ||
# as a regression test for future changes to the Dockerfile. | ||
[[ -z $(grep -r $'\r' * -l) ]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
|
||
# Abort on error, error if variable is unset, and enable debug output | ||
set -eux | ||
|
||
echo 'Verify that apt-get is not broken due to wrong package sources, repo public keys, etc.' | ||
# Added when apt-get would not update on Windows because there were Raspberry Pi Foundation apt-get | ||
# sources expecting arm32, and when not having the right public keys validating those sources. | ||
[[ $(sudo apt-get update) ]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
|
||
# Abort on error, error if variable is unset, and enable debug output | ||
set -eux | ||
|
||
echo 'TEST: directory listing' | ||
./docker/compose/directory-listing.sh | ||
|
||
echo 'TEST: packages' | ||
./docker/compose/packages.sh | ||
|
||
echo 'TEST: user access' | ||
./docker/compose/user-access.sh | ||
|
||
echo 'TEST: Done.' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
|
||
# Abort on error, error if variable is unset, and enable debug output | ||
set -eux | ||
|
||
echo 'Verify access permissions of different directories' | ||
# Added when the user was created as root so the user didn't have regular access to $HOME. | ||
[[ $(stat -c %a /home/pi) -eq 755 ]] | ||
# Added when RetroPie-Setup was running as another user than expected so the user didn't have access. | ||
[[ $(stat -c %a /home/pi/RetroPie) -eq 755 ]] | ||
# Added when 'git clone' required chmod but shouldn't have needed to. | ||
[[ $(stat -c %a /home/pi/RetroPie-Setup) -eq 755 ]] | ||
# Note: /dev/fuse test is only available at runtime so this test doesn't test the image. It would | ||
# test the running container. It's only a problem when running the container on Windows/amd64 but | ||
# it means that mounting won't work and running raspberry-pi/mount-vm-share.sh will fail. | ||
# [[ $(stat -c %a /dev/fuse) -eq 666 ]] | ||
|
||
echo 'Verify group memberships' | ||
# Added when replacing 'useradd' with 'adduser' to verify that the user gets a group with the same name. | ||
[[ $(groups | grep pi) ]] | ||
# Added when replacing 'useradd' with 'adduser' to verify that the user is still given sudo rights. | ||
[[ $(groups | grep sudo) ]] | ||
|
||
echo 'Verify that the image default user is "pi"' | ||
# Added when not setting "USER pi" as the last user in the Dockerfile. | ||
[[ $(whoami) = "pi" ]] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.