From c44297b6159e0564ae65cbe887683020ac385e22 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Fri, 20 Mar 2020 01:41:32 +0000 Subject: Generate and store system test derivations for all supported systems Rather than just the native system. I'm not quite sure of the value here, as I guess system tests should behave the same regardless of the way the software is compiled, but this seems like it could be useful, and being explicit about the system the derivation is for is good. --- ...uix_revision_system_test_derivations_add_system.sql | 18 ++++++++++++++++++ ...uix_revision_system_test_derivations_add_system.sql | 7 +++++++ sqitch/sqitch.plan | 1 + ...uix_revision_system_test_derivations_add_system.sql | 7 +++++++ 4 files changed, 33 insertions(+) create mode 100644 sqitch/deploy/guix_revision_system_test_derivations_add_system.sql create mode 100644 sqitch/revert/guix_revision_system_test_derivations_add_system.sql create mode 100644 sqitch/verify/guix_revision_system_test_derivations_add_system.sql (limited to 'sqitch') diff --git a/sqitch/deploy/guix_revision_system_test_derivations_add_system.sql b/sqitch/deploy/guix_revision_system_test_derivations_add_system.sql new file mode 100644 index 0000000..43aa9b4 --- /dev/null +++ b/sqitch/deploy/guix_revision_system_test_derivations_add_system.sql @@ -0,0 +1,18 @@ +-- Deploy guix-data-service:guix_revision_system_test_derivations_add_system to pg + +BEGIN; + +ALTER TABLE guix_revision_system_test_derivations ADD COLUMN system varchar; + +-- Assume that existing values are for 'x86_64-linux' +UPDATE guix_revision_system_test_derivations SET system = 'x86_64-linux'; + +ALTER TABLE guix_revision_system_test_derivations ALTER system SET NOT NULL; + +ALTER TABLE guix_revision_system_test_derivations + DROP CONSTRAINT guix_revision_system_test_derivations_pkey; + +ALTER TABLE guix_revision_system_test_derivations + ADD CONSTRAINT guix_revision_system_test_derivations_pkey PRIMARY KEY (guix_revision_id, system_test_id, system, derivation_id); + +COMMIT; diff --git a/sqitch/revert/guix_revision_system_test_derivations_add_system.sql b/sqitch/revert/guix_revision_system_test_derivations_add_system.sql new file mode 100644 index 0000000..cfb69f9 --- /dev/null +++ b/sqitch/revert/guix_revision_system_test_derivations_add_system.sql @@ -0,0 +1,7 @@ +-- Revert guix-data-service:guix_revision_system_test_derivations_add_system from pg + +BEGIN; + +-- XXX Add DDLs here. + +COMMIT; diff --git a/sqitch/sqitch.plan b/sqitch/sqitch.plan index 891d595..975d7ee 100644 --- a/sqitch/sqitch.plan +++ b/sqitch/sqitch.plan @@ -52,3 +52,4 @@ allow_including_and_excluding_branches_for_repositories 2020-02-08T11:30:02Z Chr channel_instance_derivations 2020-02-10T07:59:03Z Christopher Baines # Add tables to store derivations for channel instances update_build_servers_build_config 2020-02-13T20:07:19Z Christopher Baines # Update build_servers_build_config values make_some_constraints_deferrable 2020-02-16T10:54:22Z Christopher Baines # Make some constraints deferrable +guix_revision_system_test_derivations_add_system 2020-03-19T21:30:33Z Christopher Baines # Add a system column to the guix_revision_system_test_derivations table diff --git a/sqitch/verify/guix_revision_system_test_derivations_add_system.sql b/sqitch/verify/guix_revision_system_test_derivations_add_system.sql new file mode 100644 index 0000000..db42d8d --- /dev/null +++ b/sqitch/verify/guix_revision_system_test_derivations_add_system.sql @@ -0,0 +1,7 @@ +-- Verify guix-data-service:guix_revision_system_test_derivations_add_system on pg + +BEGIN; + +-- XXX Add verifications here. + +ROLLBACK; -- cgit v1.2.3