Commit ee606914 authored by intrigeri's avatar intrigeri
Browse files

Update test suite and apt-mirror to take into account that we're building...

Update test suite and apt-mirror to take into account that we're building releases from the checked out tag nowadays.
parent d55b14a2
......@@ -31,7 +31,7 @@ RESOLVED_SERIAL=$(cat "tmp/APT_snapshots.d/$ARCHIVE/serial")
if [ "$(base_branch)" = stable ]; then
if version_was_released "$(version_in_changelog)"; then
[ "$(current_branch)" = stable ] \
on_a_tag \
|| fatal "Not building from stable, but last version in changelog" \
"was released"
output_tagged_snapshot "$ARCHIVE" "$(version_in_changelog)"
......@@ -57,8 +57,8 @@ if [ "$(base_branch)" = stable ]; then
fi
elif [ "$(base_branch)" = testing ]; then
if version_was_released "$(version_in_changelog)"; then
[ "$(current_branch)" = testing ] \
|| fatal "Not building from testing, but last version in changelog" \
on_a_tag \
|| fatal "Not building from a tag, but last version in changelog" \
"was released"
[ "$ARCHIVE" = debian-security ] || [ "$SERIAL" != latest ] \
|| fatal "APT snapshots for $ARCHIVE are not frozen, which should" \
......
......@@ -4,6 +4,10 @@ current_branch() {
git branch | awk '/^\* / { print $2 }'
}
on_a_tag() {
! git symbolic-ref HEAD
}
base_branch() {
cat config/base_branch | head -n1
}
......
......@@ -56,6 +56,7 @@ Feature: custom APT sources to build branches
Given Tails 0.10 has been released
And the last version mentioned in debian/changelog is 0.10
And I am working on the stable base branch
And I checkout the 0.10 tag
And the config/APT_overlays.d directory is empty
When I successfully run tails-custom-apt-sources
Then I should see only the '0.10' suite
......@@ -64,6 +65,7 @@ Feature: custom APT sources to build branches
Given Tails 0.10 has been released
And the last version mentioned in debian/changelog is 0.10
And I am working on the stable base branch
And I checkout the 0.10 tag
And config/APT_overlays.d contains 'feature-foo'
When I run tails-custom-apt-sources
Then it should fail
......@@ -73,6 +75,7 @@ Feature: custom APT sources to build branches
And Tails 0.10 has been released
And the last version mentioned in debian/changelog is 0.10
And no frozen APT snapshot is encoded in config/APT_snapshots.d
And I checkout the 0.10 tag
When I successfully run "apt-snapshots-serials prepare-build"
And I successfully run "apt-mirror debian"
Then I should see the 0.10 tagged snapshot
......@@ -86,6 +89,7 @@ Feature: custom APT sources to build branches
And Tails 0.10 has been released
And the last version mentioned in debian/changelog is 0.10
And frozen APT snapshots are encoded in config/APT_snapshots.d
And I checkout the 0.10 tag
When I successfully run "apt-snapshots-serials prepare-build"
And I successfully run "apt-mirror debian"
Then I should see the 0.10 tagged snapshot
......@@ -200,6 +204,7 @@ Feature: custom APT sources to build branches
And the last version mentioned in debian/changelog is 0.11
And Tails 0.11 has been released
And the config/APT_overlays.d directory is empty
And I checkout the 0.11 tag
When I successfully run tails-custom-apt-sources
Then I should see only the '0.11' suite
......@@ -208,6 +213,7 @@ Feature: custom APT sources to build branches
And the last version mentioned in debian/changelog is 0.11
And Tails 0.11 has been released
And config/APT_overlays.d contains 'feature-foo'
And I checkout the 0.11 tag
When I run tails-custom-apt-sources
Then it should fail
......@@ -216,6 +222,7 @@ Feature: custom APT sources to build branches
And the last version mentioned in debian/changelog is 0.11
And Tails 0.11 has been released
And no frozen APT snapshot is encoded in config/APT_snapshots.d
And I checkout the 0.11 tag
When I successfully run "apt-snapshots-serials prepare-build"
And I run "apt-mirror debian"
Then it should fail
......@@ -229,6 +236,7 @@ Feature: custom APT sources to build branches
And the last version mentioned in debian/changelog is 0.11
And Tails 0.11 has been released
And frozen APT snapshots are encoded in config/APT_snapshots.d
And I checkout the 0.11 tag
When I successfully run "apt-snapshots-serials prepare-build"
And I successfully run "apt-mirror debian"
Then I should see the 0.11 tagged snapshot
......@@ -243,6 +251,7 @@ Feature: custom APT sources to build branches
And the last version mentioned in debian/changelog is 0.12~rc1
And Tails 0.12-rc1 has been tagged
And the config/APT_overlays.d directory is empty
And I checkout the 0.12-rc1 tag
When I successfully run tails-custom-apt-sources
Then I should see only the '0.12-rc1' suite
......@@ -252,6 +261,7 @@ Feature: custom APT sources to build branches
And the last version mentioned in debian/changelog is 0.12~rc1
And Tails 0.12-rc1 has been tagged
And config/APT_overlays.d contains 'bugfix-bar'
And I checkout the 0.12-rc1 tag
When I run tails-custom-apt-sources
Then it should fail
......
......@@ -79,6 +79,11 @@ Given %r{I am working on the ([[:alnum:]./_-]+) base branch$} do |branch|
end
end
Given %r{^I checkout the ([[:alnum:]~.-]+) tag$} do |tag|
create_git unless git_exists?
fatal_system "git checkout --quiet #{tag}"
end
Given %r{I am working on the ([[:alnum:]./_-]+) branch based on ([[:alnum:]./_-]+)$} do |branch, base|
create_git unless git_exists?
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment