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 28
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 #1 from hypriot/add-tests
Add serverspec tests for rpi-raw image
- Loading branch information
Showing
7 changed files
with
59 additions
and
11 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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
*.img | ||
*.img.zip |
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,5 +1,25 @@ | ||
# Raw Image Builder [![Build Status](https://travis-ci.org/hypriot/image-builder-raw.svg?branch=v0.0.5)](https://travis-ci.org/hypriot/image-builder-raw) | ||
# Raw Image Builder | ||
[![Join the chat at https://gitter.im/hypriot/talk](https://badges.gitter.im/hypriot/talk.svg)](https://gitter.im/hypriot/talk?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) | ||
[![Build Status](https://travis-ci.org/hypriot/image-builder-raw.svg)](https://travis-ci.org/hypriot/image-builder-raw) | ||
|
||
This repo creates a number of blank images for a couple of ARM dev boards. | ||
These images have the necessary partitions, sizes and filesystem - but not actual files. | ||
|
||
Currently there is the following image: | ||
|
||
* `rpi-raw-image` with two partitions (FAT + EXT4) for the Raspberry Pi | ||
|
||
## Contributing | ||
|
||
You can contribute to this repo by forking it and sending us pull requests. Feedback is always welcome! | ||
|
||
You can build the root filesystem locally with Docker. | ||
|
||
```bash | ||
make rpi-raw-image | ||
``` | ||
|
||
|
||
## License | ||
|
||
MIT - see the [LICENSE](./LICENSE) file for details. |
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
require 'serverspec' | ||
set :backend, :exec | ||
|
||
describe "Raw Image" do | ||
let(:image_path) { return '/rpi-raw.img' } | ||
|
||
it "exists" do | ||
image_file = file(image_path) | ||
expect(image_file).to exist | ||
end | ||
|
||
context "Partition table" do | ||
let(:stdout) { command("fdisk -l #{image_path} | grep '^/rpi-raw'").stdout } | ||
|
||
it "has 2 partitions" do | ||
partitions = stdout.split(/\r?\n/) | ||
expect(partitions.size).to be 2 | ||
end | ||
|
||
it "has a boot-partition with a sda1 W95 FAT32 filesystem" do | ||
expect(stdout).to contain('^.*\.img1 .*W95 FAT32 \(LBA\)$') | ||
end | ||
|
||
it "has a root-partition with a sda2 Linux filesystem" do | ||
expect(stdout).to contain('^.*\.img2 .*Linux$') | ||
end | ||
end | ||
end |
This file was deleted.
Oops, something went wrong.