This repository has been archived by the owner on Aug 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from hypriot/add-hypriot-image-version
Add hypriot image version
- Loading branch information
Showing
7 changed files
with
64 additions
and
36 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ script: | |
branches: | ||
only: | ||
- master | ||
- /^v\d.*$/ | ||
deploy: | ||
provider: releases | ||
api_key: | ||
|
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
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
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,33 +1,49 @@ | ||
require_relative 'spec_helper' | ||
|
||
describe "Root filesystem" do | ||
let(:rootfs_path) { return '/build' } | ||
let(:stdout) { run_mounted("cat /etc/os-release").stdout } | ||
|
||
it "exists" do | ||
rootfs_dir = file(rootfs_path) | ||
expect(rootfs_dir).to exist | ||
it "is based on debian" do | ||
expect(stdout).to contain('debian') | ||
end | ||
|
||
context "Hypriot OS Release in /etc/os-release" do | ||
let(:stdout) { command("cat #{rootfs_path}/etc/os-release").stdout } | ||
it "is debian version jessie" do | ||
expect(stdout).to contain('jessie') | ||
end | ||
|
||
it "has a HYPRIOT_OS= entry" do | ||
expect(stdout).to contain('^HYPRIOT_OS=') | ||
end | ||
it "has a HYPRIOT_TAG= entry" do | ||
expect(stdout).to contain('^HYPRIOT_TAG=') | ||
end | ||
it "has a HYPRIOT_DEVICE= entry" do | ||
expect(stdout).to contain('^HYPRIOT_DEVICE=') | ||
end | ||
it "is a HypriotOS" do | ||
expect(stdout).to contain('HypriotOS') | ||
end | ||
|
||
it "is for architecure 'HYPRIOT_OS=\"HypriotOS/armhf\"'" do | ||
expect(stdout).to contain('^HYPRIOT_OS="HypriotOS/armhf"$') | ||
end | ||
it "has a HYPRIOT_OS= entry" do | ||
expect(stdout).to contain('^HYPRIOT_OS=') | ||
end | ||
it "has a HYPRIOT_OS_VERSION= entry" do | ||
expect(stdout).to contain('^HYPRIOT_OS_VERSION=') | ||
end | ||
it "has a HYPRIOT_DEVICE= entry" do | ||
expect(stdout).to contain('^HYPRIOT_DEVICE=') | ||
end | ||
it "has a HYPRIOT_IMAGE_VERSION= entry" do | ||
expect(stdout).to contain('^HYPRIOT_IMAGE_VERSION=') | ||
end | ||
|
||
it "is for device 'HYPRIOT_DEVICE=\"ODROID C1/C1+\"'" do | ||
expect(stdout).to contain('^HYPRIOT_DEVICE="ODROID C1/C1\+"$') | ||
end | ||
it "is for architecure 'HYPRIOT_OS=\"HypriotOS/armhf\"'" do | ||
expect(stdout).to contain('HYPRIOT_OS="HypriotOS/armhf"') | ||
end | ||
|
||
it "is for device 'HYPRIOT_DEVICE=\"ODROID C1/C1+\"'" do | ||
expect(stdout).to contain('HYPRIOT_DEVICE="ODROID C1/C1') | ||
end | ||
|
||
it "uses os-rootfs version 'HYPRIOT_OS_VERSION=\"v0.7.1\"'" do | ||
expect(stdout).to contain('^HYPRIOT_OS_VERSION="v0.7.1"$') | ||
end | ||
|
||
if ENV.fetch('TRAVIS_TAG','') != '' | ||
it "is not dirty" do | ||
expect(stdout).not_to contain('dirty') | ||
end | ||
end | ||
|
||
end |
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