|
13 | 13 | psql_15 = self'.packages."psql_15/bin"; |
14 | 14 | psql_17 = self'.packages."psql_17/bin"; |
15 | 15 | psql_orioledb-17 = self'.packages."psql_orioledb-17/bin"; |
16 | | - pgroonga = self'.packages."psql_15/exts/pgroonga"; |
17 | 16 | inherit (self.supabase) defaults; |
18 | 17 | }; |
19 | 18 | in |
|
68 | 67 | ''; |
69 | 68 | }; |
70 | 69 |
|
| 70 | + # Get the major version for filtering |
| 71 | + majorVersion = |
| 72 | + let |
| 73 | + version = builtins.trace "pgpkg.version is: ${pgpkg.version}" pgpkg.version; |
| 74 | + isOrioledbMatch = builtins.match "^17_[0-9]+$" version != null; |
| 75 | + isSeventeenMatch = builtins.match "^17[.][0-9]+$" version != null; |
| 76 | + result = |
| 77 | + if isOrioledbMatch then |
| 78 | + "orioledb-17" |
| 79 | + else if isSeventeenMatch then |
| 80 | + "17" |
| 81 | + else |
| 82 | + "15"; |
| 83 | + in |
| 84 | + builtins.trace "Major version result: ${result}" result; |
| 85 | + |
| 86 | + # Select the appropriate pgroonga package for this PostgreSQL version |
| 87 | + pgroonga = self'.packages."psql_${majorVersion}/exts/pgroonga-all"; |
| 88 | + |
| 89 | + pgPort = |
| 90 | + if (majorVersion == "17") then |
| 91 | + "5535" |
| 92 | + else if (majorVersion == "15") then |
| 93 | + "5536" |
| 94 | + else |
| 95 | + "5537"; |
| 96 | + |
71 | 97 | # Use the shared setup but with a test-specific name |
72 | 98 | start-postgres-server-bin = pkgs-lib.makePostgresDevSetup { |
73 | | - inherit pkgs; |
| 99 | + inherit pkgs pgroonga; |
74 | 100 | name = "start-postgres-server-test"; |
75 | 101 | extraSubstitutions = { |
76 | 102 | PGSODIUM_GETKEY = "${getkey-script}/bin/pgsodium-getkey"; |
|
116 | 142 | in |
117 | 143 | pkgs.lib.filterAttrs (name: _: isValidFile name) files; |
118 | 144 |
|
119 | | - # Get the major version for filtering |
120 | | - majorVersion = |
121 | | - let |
122 | | - version = builtins.trace "pgpkg.version is: ${pgpkg.version}" pgpkg.version; |
123 | | - isOrioledbMatch = builtins.match "^17_[0-9]+$" version != null; |
124 | | - isSeventeenMatch = builtins.match "^17[.][0-9]+$" version != null; |
125 | | - result = |
126 | | - if isOrioledbMatch then |
127 | | - "orioledb-17" |
128 | | - else if isSeventeenMatch then |
129 | | - "17" |
130 | | - else |
131 | | - "15"; |
132 | | - in |
133 | | - builtins.trace "Major version result: ${result}" result; # Trace the result # For "15.8" |
134 | | - |
135 | 145 | # Filter SQL test files |
136 | 146 | filteredSqlTests = filterTestFiles majorVersion ./tests/sql; |
137 | 147 |
|
138 | | - pgPort = |
139 | | - if (majorVersion == "17") then |
140 | | - "5535" |
141 | | - else if (majorVersion == "15") then |
142 | | - "5536" |
143 | | - else |
144 | | - "5537"; |
145 | | - |
146 | 148 | # Convert filtered tests to a sorted list of basenames (without extension) |
147 | 149 | testList = pkgs.lib.mapAttrsToList ( |
148 | 150 | name: _: builtins.substring 0 (pkgs.lib.stringLength name - 4) name |
|
0 commit comments