Commit 872268a5 authored by Giannis Kepas's avatar Giannis Kepas
Browse files

add exercise 1 tests

parent 8e122b9a
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
[submodule "bats/bats-core"]
[submodule "bats-core"]
	path = bats/bats-core
	url = https://github.com/bats-core/bats-core.git
[submodule "bats/bats-support"]
[submodule "bats-support"]
	path = bats/bats-support
	url = https://github.com/bats-core/bats-support.git
[submodule "bats/bats-assert"]
[submodule "bats-assert"]
	path = bats/bats-assert
	url = https://github.com/bats-core/bats-assert.git
[submodule "bats/bats-file"]
	path = bats/bats-file
	url = https://github.com/bats-core/bats-file.git
+9 −27
Original line number Diff line number Diff line
default:
  image: alpine:latest
  image: debian:bookworm-slim
  before_script:
    - apk update
    - apk add --no-cache bash
    - apk add --no-cache git
    - for filename in ./*.sh; do chmod +x "${filename}"; done
    - apt-get update && apt-get install -y git dos2unix
    - git clone --recurse-submodules -j8 https://netsim.cs.uowm.gr/gitlab/operating-systems/os-tests.git
    - chmod +x ./*.sh
    # Run dos2unix on all shell scripts and any other files needed
    # I spent 2 nights trying to figure out why the tests were failing, only to find out that the line endings were wrong
    - find . -type f -name "*.sh" -exec dos2unix {} \;
    - find . -type f -name "*coins.txt" -exec dos2unix {} \;

stages:
  - test

test-task-1:
test-assignment-1:
  stage: test
  script:
    - ./os-tests/bats/bats-core/bin/bats os-tests/tests/assignment-1/a1-task1.bats

test-task-2:
  stage: test
  script:
    - ./os-tests/bats/bats-core/bin/bats os-tests/tests/assignment-1/a1-task2.bats

test-task-3:
  stage: test
  script:
    - ./os-tests/bats/bats-core/bin/bats os-tests/tests/assignment-1/a1-task3.bats

test-task-4:
  stage: test
  script:
    - ./os-tests/bats/bats-core/bin/bats os-tests/tests/assignment-1/a1-task4.bats

test-task-5:
  stage: test
  script:
    - ./os-tests/bats/bats-core/bin/bats os-tests/tests/assignment-1/a1-task5.bats
    - ./os-tests/bats/bats-core/bin/bats -x --print-output-on-failure os-tests/tests/assignment-1/a1-tests.bats
+3 −5
Original line number Diff line number Diff line
default:
  image: alpine:latest
  image: debian:bookworm-slim
  before_script:
    - apk update
    - apk add --no-cache bash
    - apk add --no-cache git
    - for filename in ./*.sh; do chmod +x "${filename}"; done
    - apt-get update && apt-get install -y git
    - git clone --recurse-submodules -j8 https://netsim.cs.uowm.gr/gitlab/operating-systems/os-tests.git
    - chmod +x ./*.sh

stages:
  - test
Original line number Diff line number Diff line
Subproject commit 0cd35d3f9a6c6a08f4cdc49efd96cda43a356a8d

tests/assignment-1/a1-task1.bats

deleted100644 → 0
+0 −6
Original line number Diff line number Diff line
#!/usr/bin/env bats

setup() {
    load '../../bats/bats-support/load'
    load '../../bats/bats-assert/load'
}
Loading