-
Notifications
You must be signed in to change notification settings - Fork 4
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
33 changed files
with
170 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
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
active: true | ||
derived: false | ||
level: 1.0 | ||
links: [] | ||
normative: false | ||
ref: '' | ||
reviewed: XYLWU-Hs44a06GH7ROEbzshG7qwQoerFvs4kHZ5ZXxw= | ||
--- | ||
|
||
# Introduction | ||
|
||
This document describes the requirements for amp-devcontainer. | ||
|
||
## Abstract | ||
|
||
amp-devcontainer is a [devcontainer](https://containers.dev/) tailored towards modern C++ development. | ||
|
||
## Definitions of key words | ||
|
||
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC 2119](https://www.rfc-editor.org/rfc/rfc2119). |
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,21 @@ | ||
--- | ||
active: true | ||
derived: false | ||
level: 2.0 | ||
links: [] | ||
normative: false | ||
ref: '' | ||
reviewed: NGwtZc9fjLTn_jPUJIaBlnRaPoeXCrhpDtoTutuvI_o= | ||
--- | ||
|
||
# Requirements | ||
|
||
This document describes the requirements for amp-devcontainer. | ||
|
||
## Abstract | ||
|
||
amp-devcontainer is a [devcontainer](https://containers.dev/) tailored towards modern C++ development. | ||
|
||
## Definitions of key words | ||
|
||
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC 2119](https://www.rfc-editor.org/rfc/rfc2119). |
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,13 @@ | ||
--- | ||
active: true | ||
derived: false | ||
level: 2.1.0 | ||
links: [] | ||
normative: false | ||
ref: '' | ||
reviewed: 6nNXJvAjfy6ZFiOHZUk6pAYIH6s354g9yKW7Nlg4sBQ= | ||
--- | ||
|
||
# Compilation | ||
|
||
This chapter list the requirements that pertain to compilation. |
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,16 +1,17 @@ | ||
--- | ||
active: true | ||
derived: false | ||
level: 1.0 | ||
level: 2.1.1 | ||
links: [] | ||
normative: true | ||
ref: '' | ||
reviewed: YlXqzBrdPVyJ1kOTSXb5BVd0U3qRt39jT_lcpotaxh8= | ||
reviewed: BahQmI-3t190oidQmtYsgRnqsF5ZInkZITtpW1PvQgY= | ||
--- | ||
|
||
**amp-devcontainer __shall__ be able to compile source-code into a working executable** | ||
# Host compilation | ||
|
||
**amp-devcontainer *SHALL* be able to compile source-code into a working executable** | ||
|
||
Compiling source-code into working executables, able to run inside the container, can be necessary in several scenarios e.g. | ||
- When targeting the container host system and architecture | ||
- When running tests inside the container | ||
- When building plug-ins, extensions, code generators, or other additional tools | ||
- When building plug-ins, extensions, code generators, or other additional tools that need to run inside the container |
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,38 @@ | ||
--- | ||
active: true | ||
derived: false | ||
level: 1.0 | ||
links: [] | ||
normative: false | ||
ref: '' | ||
reviewed: BQb72tLqNOlSKhoixy2-c7fRw2CcinT4qeWWv7gOSms= | ||
--- | ||
|
||
# Purpose | ||
|
||
This document describes the test cases to be executed as part of the verification of amp-devcontainer. | ||
|
||
``` {.sh file=tests/testsuite.bats} | ||
#!/usr/bin/env bats | ||
|
||
setup() { | ||
#!/usr/bin/env bats | ||
<<setup>> | ||
} | ||
teardown() { | ||
#!/usr/bin/env bats | ||
<<teardown>> | ||
} | ||
<<testcase>> | ||
``` | ||
``` {.sh #setup} | ||
load '/usr/local/bats-support/load' | ||
load '/usr/local/bats-assert/load' | ||
``` | ||
``` {.sh #teardown} | ||
rm -rf build | ||
``` |
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,13 @@ | ||
--- | ||
active: true | ||
derived: false | ||
level: 2.0 | ||
links: [] | ||
normative: false | ||
ref: '' | ||
reviewed: rLndHKdsx6QMzsyN_INI_Sil5SClUFemu3pBDzOri48= | ||
--- | ||
|
||
# Test cases | ||
|
||
This chapter contains a description and implementation of automated test cases used to verify the requirements of amp-devcontainer. |
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,9 @@ | ||
--- | ||
active: true | ||
derived: false | ||
level: 2.2 | ||
links: [] | ||
normative: true | ||
ref: '' | ||
reviewed: null | ||
--- |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,35 @@ | ||
#!/usr/bin/env bats | ||
# ~/~ begin <<specification/tests/HEAD-1.0.md#tests/testsuite.bats>>[init] | ||
|
||
setup() { | ||
#!/usr/bin/env bats | ||
#!/usr/bin/env bats | ||
# ~/~ begin <<specification/tests/HEAD-1.0.md#setup>>[init] | ||
load '/usr/local/bats-support/load' | ||
load '/usr/local/bats-assert/load' | ||
# ~/~ end | ||
} | ||
|
||
teardown() { | ||
#!/usr/bin/env bats | ||
#!/usr/bin/env bats | ||
# ~/~ begin <<specification/tests/HEAD-1.0.md#teardown>>[init] | ||
rm -rf build | ||
# ~/~ end | ||
} | ||
|
||
# ~/~ begin <<specification/tests/TEST-0001.md#testcase>>[init] | ||
# bats test_tags=TC:TEST-0001 | ||
@test "valid code input should result in working executable using host compiler" { | ||
run cmake --preset gcc | ||
assert_success | ||
|
||
run cmake --build --preset gcc | ||
assert_success | ||
|
||
run build/gcc/gcc/test-gcc | ||
assert_success | ||
assert_output "Hello World!" | ||
} | ||
# ~/~ end | ||
# ~/~ end |