Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mobileoverlord committed Apr 8, 2024
1 parent a4a5fe5 commit fca663b
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 10 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,22 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: '1.16.2'
otp-version: '26.2.3'
- name: Restore dependencies cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: deps
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-
- name: Install System Deps
run: |
wget https://github.com/fwup-home/fwup/releases/download/v1.10.1/fwup_1.10.1_amd64.deb
sudo dpkg -i fwup_1.10.1_amd64.deb
- name: Get dependencies and compile
run: |
mix deps.get
Expand Down
4 changes: 1 addition & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,8 @@ RUN apk --no-cache add wireguard-tools iptables ip6tables inotify-tools libstdc+
RUN apk --no-cache add 'fwup~=1.10' \
--repository http://nl.alpinelinux.org/alpine/edge/community/

# Use iptables masquerade NAT rule
ENV IPTABLES_MASQ=1
ENV PERIDIO_CONFIG_FILE=/etc/peridiod/peridio.json
ENV UBOOT_ENV_SIZE=0x20000
ARG UBOOT_ENV_SIZE=0x20000

RUN mkdir -p /etc/peridiod
RUN mkdir -p /boot
Expand Down
2 changes: 2 additions & 0 deletions config/test.exs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import Config

System.put_env("PERIDIO_CONFIG_FILE", "test/fixtures/peridio.json")

config :peridiod,
kv_backend: {Peridiod.KVBackend.InMemory, contents: %{"peridio_disk_devpath" => "/dev/mmcblk1"}}
6 changes: 3 additions & 3 deletions lib/peridiod/getty.ex
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ defmodule Peridiod.Getty do
{:stop, :normal, state}
end

def start_getty(tty_l) do
defp start_getty(tty_l) do
MuonTrap.Daemon.start_link("setsid", [
"/sbin/agetty",
"-o",
Expand All @@ -110,7 +110,7 @@ defmodule Peridiod.Getty do
])
end

def start_pty(tty_l, tty_h) do
defp start_pty(tty_l, tty_h) do
MuonTrap.Daemon.start_link("socat", [
"-d",
"-d",
Expand All @@ -119,7 +119,7 @@ defmodule Peridiod.Getty do
])
end

def start_uart(tty_h) do
defp start_uart(tty_h) do
{:ok, uart_pid} = Circuits.UART.start_link()
Circuits.UART.open(uart_pid, tty_h, speed: 115_200, active: true)
{:ok, uart_pid}
Expand Down
2 changes: 0 additions & 2 deletions support/1p.env

This file was deleted.

0 comments on commit fca663b

Please sign in to comment.