mirror of
https://github.com/ziglang/zig.git
synced 2026-01-25 00:35:20 +00:00
clone package table into custom test runner
Co-authored-by: Veikka Tuominen <git@vexu.eu>
This commit is contained in:
parent
edc0e84270
commit
948754c5d4
@ -1627,10 +1627,7 @@ pub fn create(gpa: Allocator, options: InitOptions) !*Compilation {
|
||||
const pkg = try Package.create(gpa, "root", test_dir, basename);
|
||||
|
||||
// copy package table from main_pkg to root_pkg
|
||||
var iter = main_pkg.table.valueIterator();
|
||||
while (iter.next()) |v| {
|
||||
try pkg.add(gpa, v.*);
|
||||
}
|
||||
pkg.table = try main_pkg.table.clone(gpa);
|
||||
break :test_pkg pkg;
|
||||
} else try Package.createWithDir(
|
||||
gpa,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user