authorgravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2024-03-10 23:47:16+01:00
committergravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2024-03-12 13:16:11+01:00
logb1bd3825f84edc7a8f1195b0c842fbbf8346c1cb
treee5ce8b6699fa16a90e34ceb33ff0f4a485e54fec
parentb1eba5a996ed862aefae49a1a7d1480a788095ff

test/link/macho: remove redundant 'macho-' prefix from case names


1 files changed, 47 insertions(+), 47 deletions(-)

test/link/macho.zig+47-47
......@@ -91,7 +91,7 @@ pub fn testAll(b: *Build, build_opts: BuildOptions) *Step {
9191}
9292
9393fn testDeadStrip(b: *Build, opts: Options) *Step {
94 const test_step = addTestStep(b, "macho-dead-strip", opts);
94 const test_step = addTestStep(b, "dead-strip", opts);
9595
9696 const obj = addObject(b, opts, .{ .name = "a", .cpp_source_bytes =
9797 \\#include <stdio.h>
......@@ -172,7 +172,7 @@ fn testDeadStrip(b: *Build, opts: Options) *Step {
172172}
173173
174174fn testDeadStripDylibs(b: *Build, opts: Options) *Step {
175 const test_step = addTestStep(b, "macho-dead-strip-dylibs", opts);
175 const test_step = addTestStep(b, "dead-strip-dylibs", opts);
176176
177177 const main_o = addObject(b, opts, .{ .name = "main", .c_source_bytes =
178178 \\#include <objc/runtime.h>
......@@ -221,7 +221,7 @@ fn testDeadStripDylibs(b: *Build, opts: Options) *Step {
221221}
222222
223223fn testDylib(b: *Build, opts: Options) *Step {
224 const test_step = addTestStep(b, "macho-dylib", opts);
224 const test_step = addTestStep(b, "dylib", opts);
225225
226226 const dylib = addSharedLibrary(b, opts, .{ .name = "a", .c_source_bytes =
227227 \\#include<stdio.h>
......@@ -258,7 +258,7 @@ fn testDylib(b: *Build, opts: Options) *Step {
258258}
259259
260260fn testDylibVersionTbd(b: *Build, opts: Options) *Step {
261 const test_step = addTestStep(b, "macho-dylib-version-tbd", opts);
261 const test_step = addTestStep(b, "dylib-version-tbd", opts);
262262
263263 const tbd = tbd: {
264264 const wf = WriteFile.create(b);
......@@ -294,7 +294,7 @@ fn testDylibVersionTbd(b: *Build, opts: Options) *Step {
294294}
295295
296296fn testEmptyObject(b: *Build, opts: Options) *Step {
297 const test_step = addTestStep(b, "macho-empty-object", opts);
297 const test_step = addTestStep(b, "empty-object", opts);
298298
299299 const empty = addObject(b, opts, .{ .name = "empty", .c_source_bytes = "" });
300300
......@@ -314,7 +314,7 @@ fn testEmptyObject(b: *Build, opts: Options) *Step {
314314}
315315
316316fn testEmptyZig(b: *Build, opts: Options) *Step {
317 const test_step = addTestStep(b, "macho-empty-zig", opts);
317 const test_step = addTestStep(b, "empty-zig", opts);
318318
319319 const exe = addExecutable(b, opts, .{ .name = "empty", .zig_source_bytes = "pub fn main() void {}" });
320320
......@@ -326,7 +326,7 @@ fn testEmptyZig(b: *Build, opts: Options) *Step {
326326}
327327
328328fn testEntryPoint(b: *Build, opts: Options) *Step {
329 const test_step = addTestStep(b, "macho-entry-point", opts);
329 const test_step = addTestStep(b, "entry-point", opts);
330330
331331 const exe = addExecutable(b, opts, .{ .name = "main", .c_source_bytes =
332332 \\#include<stdio.h>
......@@ -357,7 +357,7 @@ fn testEntryPoint(b: *Build, opts: Options) *Step {
357357}
358358
359359fn testEntryPointArchive(b: *Build, opts: Options) *Step {
360 const test_step = addTestStep(b, "macho-entry-point-archive", opts);
360 const test_step = addTestStep(b, "entry-point-archive", opts);
361361
362362 const lib = addStaticLibrary(b, opts, .{ .name = "main", .c_source_bytes = "int main() { return 0; }" });
363363
......@@ -386,7 +386,7 @@ fn testEntryPointArchive(b: *Build, opts: Options) *Step {
386386}
387387
388388fn testEntryPointDylib(b: *Build, opts: Options) *Step {
389 const test_step = addTestStep(b, "macho-entry-point-dylib", opts);
389 const test_step = addTestStep(b, "entry-point-dylib", opts);
390390
391391 const dylib = addSharedLibrary(b, opts, .{ .name = "a" });
392392 addCSourceBytes(dylib,
......@@ -440,7 +440,7 @@ fn testEntryPointDylib(b: *Build, opts: Options) *Step {
440440}
441441
442442fn testHeaderpad(b: *Build, opts: Options) *Step {
443 const test_step = addTestStep(b, "macho-headerpad", opts);
443 const test_step = addTestStep(b, "headerpad", opts);
444444
445445 const addExe = struct {
446446 fn addExe(bb: *Build, o: Options, name: []const u8) *Compile {
......@@ -548,7 +548,7 @@ fn testHeaderpad(b: *Build, opts: Options) *Step {
548548
549549// Adapted from https://github.com/llvm/llvm-project/blob/main/lld/test/MachO/weak-header-flags.s
550550fn testHeaderWeakFlags(b: *Build, opts: Options) *Step {
551 const test_step = addTestStep(b, "macho-header-weak-flags", opts);
551 const test_step = addTestStep(b, "header-weak-flags", opts);
552552
553553 const obj1 = addObject(b, opts, .{ .name = "a", .asm_source_bytes =
554554 \\.globl _x
......@@ -635,7 +635,7 @@ fn testHeaderWeakFlags(b: *Build, opts: Options) *Step {
635635}
636636
637637fn testHelloC(b: *Build, opts: Options) *Step {
638 const test_step = addTestStep(b, "macho-hello-c", opts);
638 const test_step = addTestStep(b, "hello-c", opts);
639639
640640 const exe = addExecutable(b, opts, .{ .name = "main", .c_source_bytes =
641641 \\#include <stdio.h>
......@@ -659,7 +659,7 @@ fn testHelloC(b: *Build, opts: Options) *Step {
659659}
660660
661661fn testHelloZig(b: *Build, opts: Options) *Step {
662 const test_step = addTestStep(b, "macho-hello-zig", opts);
662 const test_step = addTestStep(b, "hello-zig", opts);
663663
664664 const exe = addExecutable(b, opts, .{ .name = "main", .zig_source_bytes =
665665 \\const std = @import("std");
......@@ -676,7 +676,7 @@ fn testHelloZig(b: *Build, opts: Options) *Step {
676676}
677677
678678fn testLargeBss(b: *Build, opts: Options) *Step {
679 const test_step = addTestStep(b, "macho-large-bss", opts);
679 const test_step = addTestStep(b, "large-bss", opts);
680680
681681 // TODO this test used use a 4GB zerofill section but this actually fails and causes every
682682 // linker I tried misbehave in different ways. This only happened on arm64. I thought that
......@@ -697,7 +697,7 @@ fn testLargeBss(b: *Build, opts: Options) *Step {
697697}
698698
699699fn testLayout(b: *Build, opts: Options) *Step {
700 const test_step = addTestStep(b, "macho-layout", opts);
700 const test_step = addTestStep(b, "layout", opts);
701701
702702 const exe = addExecutable(b, opts, .{ .name = "main", .c_source_bytes =
703703 \\#include <stdio.h>
......@@ -816,7 +816,7 @@ fn testLayout(b: *Build, opts: Options) *Step {
816816}
817817
818818fn testLinkDirectlyCppTbd(b: *Build, opts: Options) *Step {
819 const test_step = addTestStep(b, "macho-link-directly-cpp-tbd", opts);
819 const test_step = addTestStep(b, "link-directly-cpp-tbd", opts);
820820
821821 const sdk = std.zig.system.darwin.getSdk(b.allocator, opts.target.result) orelse
822822 @panic("macOS SDK is required to run the test");
......@@ -887,7 +887,7 @@ fn testLinkingStaticLib(b: *Build, opts: Options) *Step {
887887}
888888
889889fn testLinksection(b: *Build, opts: Options) *Step {
890 const test_step = addTestStep(b, "macho-linksection", opts);
890 const test_step = addTestStep(b, "linksection", opts);
891891
892892 const obj = addObject(b, opts, .{ .name = "main", .zig_source_bytes =
893893 \\export var test_global: u32 linksection("__DATA,__TestGlobal") = undefined;
......@@ -914,7 +914,7 @@ fn testLinksection(b: *Build, opts: Options) *Step {
914914}
915915
916916fn testMhExecuteHeader(b: *Build, opts: Options) *Step {
917 const test_step = addTestStep(b, "macho-mh-execute-header", opts);
917 const test_step = addTestStep(b, "mh-execute-header", opts);
918918
919919 const exe = addExecutable(b, opts, .{ .name = "main", .c_source_bytes = "int main() { return 0; }" });
920920
......@@ -927,7 +927,7 @@ fn testMhExecuteHeader(b: *Build, opts: Options) *Step {
927927}
928928
929929fn testNoDeadStrip(b: *Build, opts: Options) *Step {
930 const test_step = addTestStep(b, "macho-no-dead-strip", opts);
930 const test_step = addTestStep(b, "no-dead-strip", opts);
931931
932932 const exe = addExecutable(b, opts, .{ .name = "name", .c_source_bytes =
933933 \\__attribute__((used)) int bogus1 = 0;
......@@ -954,7 +954,7 @@ fn testNoDeadStrip(b: *Build, opts: Options) *Step {
954954}
955955
956956fn testNoExportsDylib(b: *Build, opts: Options) *Step {
957 const test_step = addTestStep(b, "macho-no-exports-dylib", opts);
957 const test_step = addTestStep(b, "no-exports-dylib", opts);
958958
959959 const dylib = addSharedLibrary(b, opts, .{ .name = "a", .c_source_bytes = "static void abc() {}" });
960960
......@@ -967,7 +967,7 @@ fn testNoExportsDylib(b: *Build, opts: Options) *Step {
967967}
968968
969969fn testNeededFramework(b: *Build, opts: Options) *Step {
970 const test_step = addTestStep(b, "macho-needed-framework", opts);
970 const test_step = addTestStep(b, "needed-framework", opts);
971971
972972 const exe = addExecutable(b, opts, .{ .name = "main", .c_source_bytes = "int main() { return 0; }" });
973973 exe.root_module.linkFramework("Cocoa", .{ .needed = true });
......@@ -987,7 +987,7 @@ fn testNeededFramework(b: *Build, opts: Options) *Step {
987987}
988988
989989fn testNeededLibrary(b: *Build, opts: Options) *Step {
990 const test_step = addTestStep(b, "macho-needed-library", opts);
990 const test_step = addTestStep(b, "needed-library", opts);
991991
992992 const dylib = addSharedLibrary(b, opts, .{ .name = "a", .c_source_bytes = "int a = 42;" });
993993
......@@ -1011,7 +1011,7 @@ fn testNeededLibrary(b: *Build, opts: Options) *Step {
10111011}
10121012
10131013fn testObjc(b: *Build, opts: Options) *Step {
1014 const test_step = addTestStep(b, "macho-objc", opts);
1014 const test_step = addTestStep(b, "objc", opts);
10151015
10161016 const lib = addStaticLibrary(b, opts, .{ .name = "a", .objc_source_bytes =
10171017 \\#import <Foundation/Foundation.h>
......@@ -1058,7 +1058,7 @@ fn testObjc(b: *Build, opts: Options) *Step {
10581058}
10591059
10601060fn testObjcpp(b: *Build, opts: Options) *Step {
1061 const test_step = addTestStep(b, "macho-objcpp", opts);
1061 const test_step = addTestStep(b, "objcpp", opts);
10621062
10631063 const foo_h = foo_h: {
10641064 const wf = WriteFile.create(b);
......@@ -1111,7 +1111,7 @@ fn testObjcpp(b: *Build, opts: Options) *Step {
11111111}
11121112
11131113fn testPagezeroSize(b: *Build, opts: Options) *Step {
1114 const test_step = addTestStep(b, "macho-pagezero-size", opts);
1114 const test_step = addTestStep(b, "pagezero-size", opts);
11151115
11161116 {
11171117 const exe = addExecutable(b, opts, .{ .name = "main", .c_source_bytes = "int main () { return 0; }" });
......@@ -1145,7 +1145,7 @@ fn testPagezeroSize(b: *Build, opts: Options) *Step {
11451145}
11461146
11471147fn testReexportsZig(b: *Build, opts: Options) *Step {
1148 const test_step = addTestStep(b, "macho-reexports-zig", opts);
1148 const test_step = addTestStep(b, "reexports-zig", opts);
11491149
11501150 const lib = addStaticLibrary(b, opts, .{ .name = "a", .zig_source_bytes =
11511151 \\const x: i32 = 42;
......@@ -1174,7 +1174,7 @@ fn testReexportsZig(b: *Build, opts: Options) *Step {
11741174}
11751175
11761176fn testRelocatable(b: *Build, opts: Options) *Step {
1177 const test_step = addTestStep(b, "macho-relocatable", opts);
1177 const test_step = addTestStep(b, "relocatable", opts);
11781178
11791179 const a_o = addObject(b, opts, .{ .name = "a", .cpp_source_bytes =
11801180 \\#include <stdexcept>
......@@ -1242,7 +1242,7 @@ fn testRelocatable(b: *Build, opts: Options) *Step {
12421242}
12431243
12441244fn testRelocatableZig(b: *Build, opts: Options) *Step {
1245 const test_step = addTestStep(b, "macho-relocatable-zig", opts);
1245 const test_step = addTestStep(b, "relocatable-zig", opts);
12461246
12471247 const a_o = addObject(b, opts, .{ .name = "a", .zig_source_bytes =
12481248 \\const std = @import("std");
......@@ -1293,7 +1293,7 @@ fn testRelocatableZig(b: *Build, opts: Options) *Step {
12931293}
12941294
12951295fn testSearchStrategy(b: *Build, opts: Options) *Step {
1296 const test_step = addTestStep(b, "macho-search-strategy", opts);
1296 const test_step = addTestStep(b, "search-strategy", opts);
12971297
12981298 const obj = addObject(b, opts, .{ .name = "a", .c_source_bytes =
12991299 \\#include<stdio.h>
......@@ -1361,7 +1361,7 @@ fn testSearchStrategy(b: *Build, opts: Options) *Step {
13611361}
13621362
13631363fn testSectionBoundarySymbols(b: *Build, opts: Options) *Step {
1364 const test_step = addTestStep(b, "macho-section-boundary-symbols", opts);
1364 const test_step = addTestStep(b, "section-boundary-symbols", opts);
13651365
13661366 const obj1 = addObject(b, opts, .{
13671367 .name = "obj1",
......@@ -1441,7 +1441,7 @@ fn testSectionBoundarySymbols(b: *Build, opts: Options) *Step {
14411441}
14421442
14431443fn testSegmentBoundarySymbols(b: *Build, opts: Options) *Step {
1444 const test_step = addTestStep(b, "macho-segment-boundary-symbols", opts);
1444 const test_step = addTestStep(b, "segment-boundary-symbols", opts);
14451445
14461446 const obj1 = addObject(b, opts, .{ .name = "a", .cpp_source_bytes =
14471447 \\constexpr const char* MESSAGE __attribute__((used, section("__DATA_CONST_1,__message_ptr"))) = "codebase";
......@@ -1509,7 +1509,7 @@ fn testSegmentBoundarySymbols(b: *Build, opts: Options) *Step {
15091509}
15101510
15111511fn testStackSize(b: *Build, opts: Options) *Step {
1512 const test_step = addTestStep(b, "macho-stack-size", opts);
1512 const test_step = addTestStep(b, "stack-size", opts);
15131513
15141514 const exe = addExecutable(b, opts, .{ .name = "main", .c_source_bytes = "int main() { return 0; }" });
15151515 exe.stack_size = 0x100000000;
......@@ -1528,7 +1528,7 @@ fn testStackSize(b: *Build, opts: Options) *Step {
15281528}
15291529
15301530fn testTbdv3(b: *Build, opts: Options) *Step {
1531 const test_step = addTestStep(b, "macho-tbdv3", opts);
1531 const test_step = addTestStep(b, "tbdv3", opts);
15321532
15331533 const dylib = addSharedLibrary(b, opts, .{ .name = "a", .c_source_bytes = "int getFoo() { return 42; }" });
15341534
......@@ -1566,7 +1566,7 @@ fn testTbdv3(b: *Build, opts: Options) *Step {
15661566}
15671567
15681568fn testTentative(b: *Build, opts: Options) *Step {
1569 const test_step = addTestStep(b, "macho-tentative", opts);
1569 const test_step = addTestStep(b, "tentative", opts);
15701570
15711571 const exe = addExecutable(b, opts, .{ .name = "main" });
15721572 addCSourceBytes(exe,
......@@ -1592,7 +1592,7 @@ fn testTentative(b: *Build, opts: Options) *Step {
15921592}
15931593
15941594fn testThunks(b: *Build, opts: Options) *Step {
1595 const test_step = addTestStep(b, "macho-thunks", opts);
1595 const test_step = addTestStep(b, "thunks", opts);
15961596
15971597 const exe = addExecutable(b, opts, .{ .name = "main", .c_source_bytes =
15981598 \\#include <stdio.h>
......@@ -1621,7 +1621,7 @@ fn testThunks(b: *Build, opts: Options) *Step {
16211621}
16221622
16231623fn testTls(b: *Build, opts: Options) *Step {
1624 const test_step = addTestStep(b, "macho-tls", opts);
1624 const test_step = addTestStep(b, "tls", opts);
16251625
16261626 const dylib = addSharedLibrary(b, opts, .{ .name = "a", .c_source_bytes =
16271627 \\_Thread_local int a;
......@@ -1655,7 +1655,7 @@ fn testTls(b: *Build, opts: Options) *Step {
16551655}
16561656
16571657fn testTlsLargeTbss(b: *Build, opts: Options) *Step {
1658 const test_step = addTestStep(b, "macho-tls-large-tbss", opts);
1658 const test_step = addTestStep(b, "tls-large-tbss", opts);
16591659
16601660 const exe = addExecutable(b, opts, .{ .name = "main", .c_source_bytes =
16611661 \\#include <stdio.h>
......@@ -1676,7 +1676,7 @@ fn testTlsLargeTbss(b: *Build, opts: Options) *Step {
16761676}
16771677
16781678fn testTwoLevelNamespace(b: *Build, opts: Options) *Step {
1679 const test_step = addTestStep(b, "macho-two-level-namespace", opts);
1679 const test_step = addTestStep(b, "two-level-namespace", opts);
16801680
16811681 const liba = addSharedLibrary(b, opts, .{ .name = "a", .c_source_bytes =
16821682 \\#include <stdio.h>
......@@ -1796,7 +1796,7 @@ fn testTwoLevelNamespace(b: *Build, opts: Options) *Step {
17961796}
17971797
17981798fn testUndefinedFlag(b: *Build, opts: Options) *Step {
1799 const test_step = addTestStep(b, "macho-undefined-flag", opts);
1799 const test_step = addTestStep(b, "undefined-flag", opts);
18001800
18011801 const obj = addObject(b, opts, .{ .name = "a", .c_source_bytes = "int foo = 42;" });
18021802
......@@ -1873,7 +1873,7 @@ fn testUndefinedFlag(b: *Build, opts: Options) *Step {
18731873}
18741874
18751875fn testUnwindInfo(b: *Build, opts: Options) *Step {
1876 const test_step = addTestStep(b, "macho-unwind-info", opts);
1876 const test_step = addTestStep(b, "unwind-info", opts);
18771877
18781878 const all_h = all_h: {
18791879 const wf = WriteFile.create(b);
......@@ -2031,7 +2031,7 @@ fn testUnwindInfo(b: *Build, opts: Options) *Step {
20312031}
20322032
20332033fn testUnwindInfoNoSubsectionsArm64(b: *Build, opts: Options) *Step {
2034 const test_step = addTestStep(b, "macho-unwind-info-no-subsections-arm64", opts);
2034 const test_step = addTestStep(b, "unwind-info-no-subsections-arm64", opts);
20352035
20362036 const a_o = addObject(b, opts, .{ .name = "a", .asm_source_bytes =
20372037 \\.globl _foo
......@@ -2091,7 +2091,7 @@ fn testUnwindInfoNoSubsectionsArm64(b: *Build, opts: Options) *Step {
20912091}
20922092
20932093fn testUnwindInfoNoSubsectionsX64(b: *Build, opts: Options) *Step {
2094 const test_step = addTestStep(b, "macho-unwind-info-no-subsections-x64", opts);
2094 const test_step = addTestStep(b, "unwind-info-no-subsections-x64", opts);
20952095
20962096 const a_o = addObject(b, opts, .{ .name = "a", .asm_source_bytes =
20972097 \\.globl _foo
......@@ -2144,7 +2144,7 @@ fn testUnwindInfoNoSubsectionsX64(b: *Build, opts: Options) *Step {
21442144
21452145// Adapted from https://github.com/llvm/llvm-project/blob/main/lld/test/MachO/weak-binding.s
21462146fn testWeakBind(b: *Build, opts: Options) *Step {
2147 const test_step = addTestStep(b, "macho-weak-bind", opts);
2147 const test_step = addTestStep(b, "weak-bind", opts);
21482148
21492149 const lib = addSharedLibrary(b, opts, .{ .name = "foo", .asm_source_bytes =
21502150 \\.globl _weak_dysym
......@@ -2275,7 +2275,7 @@ fn testWeakBind(b: *Build, opts: Options) *Step {
22752275}
22762276
22772277fn testWeakFramework(b: *Build, opts: Options) *Step {
2278 const test_step = addTestStep(b, "macho-weak-framework", opts);
2278 const test_step = addTestStep(b, "weak-framework", opts);
22792279
22802280 const exe = addExecutable(b, opts, .{ .name = "main", .c_source_bytes = "int main() { return 0; }" });
22812281 exe.root_module.linkFramework("Cocoa", .{ .weak = true });
......@@ -2294,7 +2294,7 @@ fn testWeakFramework(b: *Build, opts: Options) *Step {
22942294}
22952295
22962296fn testWeakLibrary(b: *Build, opts: Options) *Step {
2297 const test_step = addTestStep(b, "macho-weak-library", opts);
2297 const test_step = addTestStep(b, "weak-library", opts);
22982298
22992299 const dylib = addSharedLibrary(b, opts, .{ .name = "a", .c_source_bytes =
23002300 \\#include<stdio.h>
......@@ -2337,7 +2337,7 @@ fn testWeakLibrary(b: *Build, opts: Options) *Step {
23372337}
23382338
23392339fn testWeakRef(b: *Build, opts: Options) *Step {
2340 const test_step = addTestStep(b, "macho-weak-ref", opts);
2340 const test_step = addTestStep(b, "weak-ref", opts);
23412341
23422342 const exe = addExecutable(b, opts, .{ .name = "main", .c_source_bytes =
23432343 \\#include <stdio.h>
......@@ -2356,7 +2356,7 @@ fn testWeakRef(b: *Build, opts: Options) *Step {
23562356}
23572357
23582358fn addTestStep(b: *Build, comptime prefix: []const u8, opts: Options) *Step {
2359 return link.addTestStep(b, "macho-" ++ prefix, opts);
2359 return link.addTestStep(b, "" ++ prefix, opts);
23602360}
23612361
23622362const builtin = @import("builtin");