From b7f3ec46d764ff0bdb13cce6ee67e8a6a9b8d952 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Wed, 23 Jul 2025 23:03:06 +0300 Subject: [PATCH 001/187] run_unittest Signed-off-by: Andrei Horodniceanu --- test/run_unittest/dub.json | 5 + test/run_unittest/source/app.d | 48 +++ test/run_unittest/source/run_unittest/log.d | 197 ++++++++++ .../source/run_unittest/runner/config.d | 185 +++++++++ .../source/run_unittest/runner/individual.d | 260 +++++++++++++ .../source/run_unittest/runner/package.d | 4 + .../source/run_unittest/runner/runner.d | 148 ++++++++ .../source/run_unittest/test_config.d | 354 ++++++++++++++++++ 8 files changed, 1201 insertions(+) create mode 100644 test/run_unittest/dub.json create mode 100644 test/run_unittest/source/app.d create mode 100644 test/run_unittest/source/run_unittest/log.d create mode 100644 test/run_unittest/source/run_unittest/runner/config.d create mode 100644 test/run_unittest/source/run_unittest/runner/individual.d create mode 100644 test/run_unittest/source/run_unittest/runner/package.d create mode 100644 test/run_unittest/source/run_unittest/runner/runner.d create mode 100644 test/run_unittest/source/run_unittest/test_config.d diff --git a/test/run_unittest/dub.json b/test/run_unittest/dub.json new file mode 100644 index 0000000000..0832001c31 --- /dev/null +++ b/test/run_unittest/dub.json @@ -0,0 +1,5 @@ +{ + "description": "Dub test runner", + "license": "MIT", + "name": "run_unittest" +} diff --git a/test/run_unittest/source/app.d b/test/run_unittest/source/app.d new file mode 100644 index 0000000000..a451e4b47c --- /dev/null +++ b/test/run_unittest/source/app.d @@ -0,0 +1,48 @@ +module app; + +import run_unittest.log; +import run_unittest.runner; + +import std.file; +import std.getopt; +import std.stdio; +import std.path; + +int main(string[] args) { + bool verbose; + bool color; + int jobs; + version(Posix) + color = true; + + auto help = getopt(args, + "v|verbose", &verbose, + "color", &color, + "j|jobs", &jobs, + ); + if (help.helpWanted) { + defaultGetoptPrinter(`run_unittest [-v|--verbose] [--color] [-j|--jobs] [...] + + are shell globs matching directory names under test/ +`, help.options); + return 0; + } + + auto testDir = __FILE_FULL_PATH__.dirName.dirName.dirName.buildPath("new_tests"); + chdir(testDir); + + ErrorSink sink; + { + ErrorSink fileSink = new FileSink("test.log"); + ErrorSink consoleSink = new ConsoleSink(color); + if (!verbose) + consoleSink = new NonVerboseSink(consoleSink); + sink = new GroupSink(fileSink, consoleSink); + } + auto config = generateRunnerConfig(sink); + config.color = color; + config.jobs = jobs; + + auto runner = Runner(config, sink); + return runner.run(args[1 .. $]); +} diff --git a/test/run_unittest/source/run_unittest/log.d b/test/run_unittest/source/run_unittest/log.d new file mode 100644 index 0000000000..fc6c9b516f --- /dev/null +++ b/test/run_unittest/source/run_unittest/log.d @@ -0,0 +1,197 @@ +module run_unittest.log; + +import std.conv; +import std.format; +import std.stdio; + +enum Severity { + Info, + Warning, + Error, + Status, +} + +string getName(Severity severity) { + final switch (severity) { + case Severity.Warning: + return "WARN"; + case Severity.Info: + return "INFO"; + case Severity.Error: + return "ERROR"; + case Severity.Status: + return "STAT"; + } +} + +abstract class ErrorSink { + void info (const(char)[] msg) { + log(Severity.Info, msg); + } + void warn (const(char)[] msg) { + log(Severity.Warning, msg); + } + void error (const(char)[] msg) { + log(Severity.Error, msg); + } + void status (const(char)[] msg) { + log(Severity.Status, msg); + } + + void info (Args...) (Args args) { + log(Severity.Info, text(args)); + } + void warn (Args...) (Args args) { + log(Severity.Warning, text(args)); + } + void error (Args...) (Args args) { + log(Severity.Error, text(args)); + } + void status (Args...) (Args args) { + log(Severity.Status, text(args)); + } + + abstract void log(Severity severity, const(char)[] msg); + void log (Args...) (Severity severity, Args args) { + log(severity, text(args)); + } +} + +class ConsoleSink : ErrorSink { + this(bool useColor) { + this.useColor = useColor; + } + + override void log (Severity severity, const(char)[] msg) { + immutable preamble = severity.getName; + immutable color = getColor(severity); + + immutable colorBegin = useColor ? "\033[0;" ~ color ~ "m" : ""; + immutable colorEnd = useColor ? "\033[0;m" : ""; + immutable str = format("%s[%5s]:%s %s", colorBegin, preamble, colorEnd, msg); + + stderr.writeln(str); + stderr.flush(); + } + +private: + bool useColor; + + enum AnsiColor { + Red = "31", + Green = "32", + Yellow = "33", + } + + string getColor(Severity severity) { + final switch (severity) { + case Severity.Warning: + return AnsiColor.Yellow; + case Severity.Info: + return AnsiColor.Green; + case Severity.Error: + return AnsiColor.Red; + case Severity.Status: + return AnsiColor.Green; + } + } +} + +class FileSink : ErrorSink { + this(string logFile) { + this.logFile = File(logFile, "w"); + } + + override void log (Severity severity, const(char)[] msg) { + immutable preamble = severity.getName; + immutable str = format("[%5s]: %s", preamble, msg); + logFile.writeln(str); + } + +private: + File logFile; +} + +class GroupSink : ErrorSink { + this (ErrorSink[] sinks...) { + this.sinks = sinks.dup; + } + + override void log (Severity severity, const(char)[] msg) { + foreach (sink; sinks) + sink.log(severity, msg); + } + +private: + ErrorSink[] sinks; +} + +class TestCaseSink : ErrorSink { + ErrorSink proxy; + string tc; + this(ErrorSink proxy, string testCase) { + this.proxy = proxy; + tc = testCase; + } + + override void log(Severity severity, const(char)[] msg) { + proxy.log(severity, tc, ": ", msg); + } +} + +class CaptureErrorSink : ErrorSink { + const(char)[][][Severity] capturedMessages; + + override void log (Severity severity, const(char)[] msg) { + capturedMessages[severity] ~= msg; + } + + override string toString() const { + import std.conv; + return text(capturedMessages); + } + + bool empty() { + int result = 0; + foreach (value; capturedMessages) + result += value.length; + return result == 0; + } + void clear() { + foreach (ref value; capturedMessages) value = []; + } + + const(char)[][] errors () { + return capturedMessages[Severity.Error]; + } + const(char)[] errorsBlock () { + return block(Severity.Error); + } + const(char)[] warningsBlock () { + return block(Severity.Warning); + } + const(char)[] infosBlock () { + return block(Severity.Info); + } + const(char)[] statusBlock () { + return block(Severity.Status); + } + +private: + const(char)[] block(Severity severity) { + import std.array; + return capturedMessages.get(severity, []).join(" "); + } +} + +class NonVerboseSink : ErrorSink { + public ErrorSink sink; + this(ErrorSink sink) { + this.sink = sink; + } + + override void log(Severity severity, const(char)[] msg) { + if (severity == Severity.Info) return; + sink.log(severity, msg); + } +} diff --git a/test/run_unittest/source/run_unittest/runner/config.d b/test/run_unittest/source/run_unittest/runner/config.d new file mode 100644 index 0000000000..eb3d865470 --- /dev/null +++ b/test/run_unittest/source/run_unittest/runner/config.d @@ -0,0 +1,185 @@ +module run_unittest.runner.config; + +import run_unittest.test_config; +import run_unittest.log; + +import core.sync.mutex; +import std.algorithm; + +struct RunnerConfig { + Os os; + DcBackend dc_backend; + FeVersion dlang_fe_version; + + string dubPath; + string dc; + bool color; + int jobs; +} + +RunnerConfig generateRunnerConfig(ErrorSink sink) { + import std.process; + + RunnerConfig config; + + version(linux) config.os = Os.linux; + else version(Windows) config.os = Os.windows; + else version(OSX) config.os = Os.osx; + else static assert(false, "Unknown target OS"); + + version(DigitalMars) config.dc_backend = DcBackend.dmd; + else version(LDC) config.dc_backend = DcBackend.ldc; + else version(GNU) config.dc_backend = DcBackend.gdc; + else static assert(false, "Unknown compiler"); + { + auto envDc = environment.get("DC"); + if (envDc.length == 0) { + sink.warn("The DC environment is empty. Defaulting to dmd"); + envDc = "dmd"; + } + + handleEnvironmentDc(envDc, config.dc_backend, sink); + config.dc = envDc; + } + + import std.format; + config.dlang_fe_version = __VERSION__; + { + const envFe = environment.get("FRONTEND"); + handleEnvironmentFrontend(envFe, sink); + } + + import std.path; + immutable fallbackPath = buildNormalizedPath(absolutePath("../../bin/dub")); + config.dubPath = environment.get("DUB", fallbackPath); + + return config; +} + + +private: + +void handleEnvironmentFrontend(string envFe, ErrorSink errorSink) { + if (envFe.length == 0) return; + + errorSink.warn("The FRONTEND environment variable is ignored and this script will compute it by itself"); + errorSink.warn("You can safely remove the variable from the environment"); +} + +unittest { + auto sink = new CaptureErrorSink(); + handleEnvironmentFrontend(null, sink); + assert(sink.empty()); +} + +unittest { + auto sink = new CaptureErrorSink(); + handleEnvironmentFrontend("", sink); + assert(sink.empty()); +} + +unittest { + auto sink = new CaptureErrorSink(); + handleEnvironmentFrontend("2109", sink); + assert(!sink.empty()); + assert(sink.warningsBlock.canFind("FRONTEND")); +} + +void handleEnvironmentDc(string envDc, DcBackend thisDc, ErrorSink sink) { + import std.path; + + const dcBasename = baseName(envDc); + DcBackend dcBackendGuess; + if (dcBasename.canFind("gdmd")) + dcBackendGuess = DcBackend.gdc; + else if (dcBasename.canFind("gdc")) { + sink.error("Running the testsuite with plain gdc is not supported."); + sink.error("Please use (an up-to-date) gdmd instead."); + throw new Exception("gdc is not supported. Use gdmd"); + } else if (dcBasename.canFind("ldc", "ldmd")) + dcBackendGuess = DcBackend.ldc; + else if (dcBasename.canFind("dmd")) + dcBackendGuess = DcBackend.dmd; + else { + // Dub will fail as well with this + throw new Exception("DC environment variable(" ~ envDc ~ ") does not seem to be a D compiler"); + } + + if (dcBackendGuess != thisDc) { + sink.error("The DC environment is not the same backend as the D compiler"); + sink.error("used to build this script: ", dcBackendGuess, " vs ", thisDc, '.'); + sink.error("If you invoke this script manually make sure you compile this"); + sink.error("script with the same compiler that you will run the tests with."); + + throw new Exception("$DC is not the same compiler as the one used to build this script"); + } +} + +CaptureErrorSink successfullDcTestCase(string env, DcBackend backend) { + auto sink = new CaptureErrorSink(); + try { + handleEnvironmentDc(env, backend, sink); + } catch (Exception e) { + assert(false, sink.toString()); + } + return sink; +} + +CaptureErrorSink unsuccessfullDcTestCase(string env, DcBackend backend) { + auto sink = new CaptureErrorSink(); + try { + handleEnvironmentDc(env, backend, sink); + } catch (Exception e) { + return sink; + } + assert(false, "handleEnvironemntDc did not fail as expected"); +} + +unittest { + auto sink = successfullDcTestCase("/usr/bin/dmd", DcBackend.dmd); + assert(sink.empty, sink.toString); +} +unittest { + auto sink = successfullDcTestCase("dmd", DcBackend.dmd); + assert(sink.empty); +} + +unittest { + successfullDcTestCase("/usr/bin/dmd-2.109", DcBackend.dmd); +} +unittest { + successfullDcTestCase("dmd-2.111", DcBackend.dmd); +} +unittest { + successfullDcTestCase("/bin/gdmd", DcBackend.gdc); +} +unittest { + successfullDcTestCase("x86_64-pc-linux-gnu-gdmd-15", DcBackend.gdc); +} +unittest { + successfullDcTestCase("ldc2", DcBackend.ldc); +} +unittest { + successfullDcTestCase("/usr/local/bin/ldc", DcBackend.ldc); +} +unittest { + successfullDcTestCase("ldmd2-1.37", DcBackend.ldc); +} + +unittest { + unsuccessfullDcTestCase("/usr/bin/true", DcBackend.dmd); +} + +unittest { + auto sink = unsuccessfullDcTestCase("dmd", DcBackend.gdc); + assert(sink.errorsBlock.canFind("dmd")); + assert(sink.errorsBlock.canFind("gdc")); + + assert(sink.errorsBlock.canFind("compile this script with the same compiler")); +} + +unittest { + auto sink = unsuccessfullDcTestCase("gdc-11", DcBackend.gdc); + assert(sink.errorsBlock.canFind("gdc")); + assert(sink.errorsBlock.canFind("gdmd")); +} diff --git a/test/run_unittest/source/run_unittest/runner/individual.d b/test/run_unittest/source/run_unittest/runner/individual.d new file mode 100644 index 0000000000..128187d7c1 --- /dev/null +++ b/test/run_unittest/source/run_unittest/runner/individual.d @@ -0,0 +1,260 @@ +module run_unittest.runner.individual; + +import run_unittest.log; +import run_unittest.runner; +import run_unittest.test_config; + +import std.algorithm; +import std.file; +import std.format; +import std.path; +import std.process; + +struct TestCaseRunner { + string tc; + ErrorSink sink; + Runner runner; + void delegate() testResultAction = null; + + void run() { + initConfig(); + ensureTestCanRun(); + + runner.acquireLocks(testConfig); + scope(exit) runner.releaseLocks(testConfig); + + scope(success) endTest(); + if (testConfig.dub_command.length != 0) { + foreach (dubConfig; ["dub.sdl", "dub.json", "package.json"]) + if (exists(buildPath(tc, dubConfig))) { + runDubTestCase(); + return; + } + } + } + +private: + TestConfig testConfig; + + void ensureTestCanRun() { + import std.array; + import std.format; + + string reason; + static foreach (member; ["dc_backend", "os"]) {{ + const testArray = __traits(getMember, testConfig, member); + const myValue = __traits(getMember, runner.config, member); + + if (testArray.length && !testArray.canFind(myValue)) { + reason = format("our %s (%s) is not in %s", member, myValue, testArray); + } + }} + + if (testConfig.dlang_fe_version_min != 0 + && testConfig.dlang_fe_version_min > runner.config.dlang_fe_version) + reason = format("our frontend version (%s) is lower than the minimum %s", + runner.config.dlang_fe_version, testConfig.dlang_fe_version_min); + + if (reason) + skipTest(reason); + } + + unittest { + import std.exception; + + auto sink = new CaptureErrorSink(); + TestCaseRunner tcr = TestCaseRunner("foo", sink, Runner()); + + tcr.runner.config.dc_backend = DcBackend.dmd; + tcr.runner.config.os = Os.linux; + tcr.testConfig.dc_backend = [ DcBackend.dmd ]; + tcr.testConfig.os = [ Os.linux ]; + + tcr.ensureTestCanRun(); + + tcr.testConfig.dc_backend = [ DcBackend.gdc, DcBackend.ldc, DcBackend.dmd]; + tcr.ensureTestCanRun(); + + tcr.testConfig.dc_backend = [ DcBackend.gdc, DcBackend.ldc ]; + assertThrown!TCSkip(tcr.ensureTestCanRun()); + assert(sink.statusBlock.canFind("dmd")); + assert(sink.statusBlock.canFind("dc_backend")); + sink.clear(); + + tcr.testConfig.dc_backend = [ DcBackend.dmd ]; + tcr.testConfig.os = [ Os.windows ]; + assertThrown!TCSkip(tcr.ensureTestCanRun()); + assert(sink.statusBlock.canFind("linux"), sink.toString()); + assert(sink.statusBlock.canFind("os")); + assert(sink.statusBlock.canFind("windows")); + sink.clear; + + tcr.testConfig.os = [ Os.linux ]; + tcr.testConfig.dlang_fe_version_min = 2100; + tcr.runner.config.dlang_fe_version = 2105; + tcr.ensureTestCanRun(); + + tcr.testConfig.dlang_fe_version_min = 2110; + assertThrown!TCSkip(tcr.ensureTestCanRun()); + assert(sink.statusBlock.canFind("2110")); + assert(sink.statusBlock.canFind("2105")); + sink.clear(); + } + + void initConfig() { + immutable testConfigPath = buildPath(tc, "test.config"); + if (testConfigPath.exists) { + immutable testConfigContents = readText(testConfigPath); + try + testConfig = parseConfig(testConfigContents, sink); + catch (Exception e) + failTest("Could not load test.config:", e); + } + + testConfig.locks ~= tc; + } + + void runDubTestCase() + in(testConfig.dub_command.length != 0) + { + foreach (cmd; getDubCmds()) { + auto env = [ + "DUB": runner.config.dubPath, + "DC": runner.config.dc, + "CURR_DIR": getcwd(), + ]; + immutable redirect = Redirect.stdout | Redirect.stderrToStdout; + + beginTest(cmd); + auto pipes = pipeProcess(cmd, redirect, env, Config.none, tc); + scope(exit) pipes.pid.wait; + + foreach (line; pipes.stdout.byLine) + passthrough(line); + + // Handle possible skips or explicit failures + if (testResultAction) + testResultAction(); + + immutable exitStatus = pipes.pid.wait; + if (testConfig.expect_nonzero) { + if (exitStatus == 0) + failTest("Expected non-0 exit status"); + } else + if (exitStatus != 0) + failTest("Expected 0 exit status"); + } + } + + string[][] getDubCmds() { + string[][] result; + foreach (dub_command; testConfig.dub_command) { + string dubVerb; + sw: final switch (dub_command) { + static foreach (member; __traits(allMembers, DubCommand)) { + case __traits(getMember, DubCommand, member): + dubVerb = member; + break sw; + } + } + + auto now = [runner.config.dubPath, dubVerb, "--force"]; + now ~= ["--color", runner.config.color ? "always" : "never"]; + if (testConfig.dub_build_type !is null) + now ~= ["--build", testConfig.dub_build_type]; + now ~= testConfig.extra_dub_args; + result ~= now; + } + return result; + } + + unittest { + auto tcr = TestCaseRunner(); + tcr.runner.config.dubPath = "dub"; + tcr.runner.config.color = true; + tcr.testConfig.dub_command = [ DubCommand.build ]; + import std.stdio; + assert(tcr.getDubCmds == [ ["dub", "build", "--force", "--color", "always"] ]); + } + + unittest { + auto tcr = TestCaseRunner(); + tcr.runner.config.dubPath = "dub"; + tcr.runner.config.color = false; + tcr.testConfig.dub_command = [ DubCommand.build, DubCommand.test ]; + assert(tcr.getDubCmds == [ + ["dub", "build", "--force", "--color", "never"], + ["dub", "test", "--force", "--color", "never"], + ]); + } + + unittest { + auto tcr = TestCaseRunner(); + tcr.runner.config.dubPath = "dub"; + tcr.runner.config.color = false; + tcr.testConfig.dub_command = [ DubCommand.run ]; + tcr.testConfig.extra_dub_args = [ "--", "--switch" ]; + assert(tcr.getDubCmds == [ + ["dub", "run", "--force", "--color", "never", "--", "--switch"], + ]); + } + + void passthrough(const(char)[] logLine) { + import std.typecons; + import std.string; + alias Tup = Tuple!(string, void delegate(const(char)[])); + auto actions = [ + Tup("ERROR", &sink.error), + Tup("INFO", &sink.info), + Tup("FAIL", (line) { + immutable cpy = line.idup; + testResultAction = () => failTest(cpy); + }), + Tup("SKIP", (line) { + immutable cpy = line.idup; + testResultAction = () => skipTest(cpy); + }), + ]; + + foreach (tup; actions) { + immutable match = "[" ~ tup[0] ~ "]: "; + if (logLine.startsWith(match)) { + const rest = logLine[match.length .. $]; + tup[1](rest); + return; + } + } + sink.info(logLine); + } + + void beginTest(const string[] cmd) { + import std.array; + sink.status("starting: ", cmd.join(" ")); + } + void endTest() { + sink.status("success"); + } + noreturn failTest(const(char)[] reason, in Throwable exception = null) { + sink.error("failed because: ", reason); + + if (exception) { + import std.conv; + sink.error("Error context:"); + foreach (trace; exception.info) + sink.error(trace); + } + + throw new TCFailure(); + } + noreturn skipTest(const(char)[] reason) { + sink.status("skipped because ", reason); + throw new TCSkip(); + } +} + + +class TestResult : Exception { + this() { super(""); } +} +class TCFailure : TestResult {} +class TCSkip : TestResult {} diff --git a/test/run_unittest/source/run_unittest/runner/package.d b/test/run_unittest/source/run_unittest/runner/package.d new file mode 100644 index 0000000000..43a607af87 --- /dev/null +++ b/test/run_unittest/source/run_unittest/runner/package.d @@ -0,0 +1,4 @@ +module run_unittest.runner; + +public import run_unittest.runner.runner; +public import run_unittest.runner.config; diff --git a/test/run_unittest/source/run_unittest/runner/runner.d b/test/run_unittest/source/run_unittest/runner/runner.d new file mode 100644 index 0000000000..a952eebd5f --- /dev/null +++ b/test/run_unittest/source/run_unittest/runner/runner.d @@ -0,0 +1,148 @@ +module run_unittest.runner.runner; + +import run_unittest.test_config; +import run_unittest.runner.config; +import run_unittest.runner.individual; +import run_unittest.log; + +import core.sync.rwmutex; +import core.sync.mutex; +import core.atomic; +import std.array; +import std.algorithm; +import std.file; +import std.format; +import std.path; + +struct Runner { + RunnerConfig config; + ErrorSink sink; + + shared int skippedTests; + shared int failedTests; + shared int successfulTests; + int totalTests () { + return skippedTests.atomicLoad + failedTests.atomicLoad + successfulTests.atomicLoad; + } + + this(RunnerConfig config, ErrorSink sink) { + this.config = config; + this.sink = sink; + + // Get around issue https://github.com/dlang/dmd/issues/17955 + // with older compilers + //locks = new typeof(locks); + locks[""] = null; + locksMutex = new typeof(locksMutex); + lockExclusive = new typeof(lockExclusive); + } + + int run (string[] patterns) { + if (config.dc_backend == DcBackend.gdc) { + import std.process; + if ("DFLAGS" !in environment) { + immutable defaultFlags = "-q,-Wno-error -allinst"; + sink.info("Adding ", defaultFlags, " to DFLAGS because gdmd will fail some tests without them"); + environment["DFLAGS"] = defaultFlags; + } + } + + const testCases = dirEntries(".", SpanMode.shallow) + .filter!`a.isDir` + .filter!(a => !canFind(["extra", "common"], a.baseName)) + .filter!(entry => entry.name.matches(patterns)) + .map!(a => a.name.baseName) + .array; + + void runTc(string tc) { + auto tcSink = new TestCaseSink(sink, tc); + auto tcRunner = TestCaseRunner(tc, tcSink, this); + try { + tcRunner.run(); + successfulTests.atomicOp!"+="(1); + } catch (TCFailure) { + failedTests.atomicOp!"+="(1); + } catch (TCSkip) { + skippedTests.atomicOp!"+="(1); + } catch (Exception e) { + tcSink.error("Unexpected exception was thrown: ", e); + failedTests.atomicOp!"+="(1); + } + } + + import std.parallelism; + if (config.jobs != 0) + defaultPoolThreads = config.jobs - 1; + foreach (tc; testCases.parallel) + runTc(tc); + + if (totalTests == 0) { + sink.error("No tests that match your search were found"); + throw new Exception("No tests were run"); + } + + sink.status(format("Summary %s total: %s successful %s failed and %s skipped", + totalTests, successfulTests.atomicLoad, failedTests.atomicLoad, skippedTests.atomicLoad)); + return failedTests != 0; + } + + void acquireLocks (const TestConfig testConfig) { + if (testConfig.must_be_run_alone) { + lockExclusive.writer.lock(); + return; + } + + lockExclusive.reader.lock(); + + const orderedKeys = testConfig.locks.dup.sort.release; + auto ourLocks = new shared(Mutex)[](orderedKeys.length); + + onLocks((locks) { + foreach (i, key; orderedKeys) + ourLocks[i].atomicStore(cast(shared)locks.require(key, new Mutex())); + }); + + foreach (i; 0 .. ourLocks.length) + ourLocks[i].lock; + } + + void releaseLocks (const TestConfig testConfig) { + if (testConfig.must_be_run_alone) { + lockExclusive.writer.unlock(); + return; + } + lockExclusive.reader.unlock(); + + onLocks((locks) { + testConfig.locks.each!(key => locks[key].unlock); + }); + } +private: + shared ReadWriteMutex lockExclusive; + shared Mutex[string] locks; + void onLocks(void delegate(Mutex[string] unsharedLocks) action) { + locksMutex.lock; + scope(exit) locksMutex.unlock; + action(cast(Mutex[string])locks); + } + + shared Mutex locksMutex; +} + +private: + +bool matches(string dir, string[] patterns) { + if (patterns.length == 0) return true; + + foreach (pat; patterns) + if (globMatch(baseName(dir), pat)) return true; + return false; +} + +unittest { + assert(matches("./foo", [])); + assert(matches("./foo", ["foo"])); + assert(matches("./foo", ["f*"])); + assert(!matches("./foo", ["bar"])); + assert(matches("./foo", ["b", "f*"])); +} diff --git a/test/run_unittest/source/run_unittest/test_config.d b/test/run_unittest/source/run_unittest/test_config.d new file mode 100644 index 0000000000..510dcad67f --- /dev/null +++ b/test/run_unittest/source/run_unittest/test_config.d @@ -0,0 +1,354 @@ +module run_unittest.test_config; + +import run_unittest.log; + +import std.algorithm; +import std.array; +import std.conv; +import std.string; + +enum Os { + linux, + windows, + osx, +} + +enum DcBackend { + gdc, + dmd, + ldc, +} + +enum DubCommand { + run, + test, + build, + none, +} + +struct FeVersion { + int value; + alias value this; +} + +struct TestConfig { + Os[] os; + DcBackend[] dc_backend; + FeVersion dlang_fe_version_min; + DubCommand[] dub_command = [ DubCommand.run ]; + string dub_config = null; + string dub_build_type = null; + string[] locks; + bool expect_nonzero = false; + + string[] extra_dub_args; + bool must_be_run_alone = false; +} + +TestConfig parseConfig(string content, ErrorSink errorSink) { + TestConfig result; + + bool any_errors = false; + foreach (line; content.lineSplitter) { + line = line.strip(); + if (line.empty) continue; + if (line[0] == '#') continue; + + const split = line.findSplit("="); + if (!split[1].length) { + errorSink.warn("Malformed config line '", line, "'. Missing ="); + continue; + } + + const key = split[0].strip(); + const value = split[2]; + + sw: switch (key) { + static foreach (idx, _; TestConfig.tupleof) { + case TestConfig.tupleof[idx].stringof: + if (!handle(result.tupleof[idx], key, value, errorSink)) + any_errors = true; + break sw; + } + default: + errorSink.error("Setting ", key, " is not recognized.", + " Available settings are: ", + join([__traits(allMembers, TestConfig)], ", ")); + any_errors = true; + break; + } + } + + if (any_errors) + throw new Exception("Config file is not in the correct format"); + + return result; +} + + +private: + +bool handle(T)(ref T field, string memberName, string value, ErrorSink errorSink) + if (is(T == string) || !is(T: V[], V)) +{ + value = value.strip(); + try { + alias TgtType = TargetType!T; + field = to!TgtType(value); + } catch (ConvException e) { + + errorSink.error("Setting ", memberName, " does not recognize value ", value, + ". Possible values are: ", PossibleValues!T); + return false; + } + + static if (is(T == FeVersion)) { + if (field < 2000 || field >= 3000) { + errorSink.error("The value ", value, " for setting ", memberName, " does not respect the format ", PossibleValues!T); + return false; + } + } + return true; +} + +bool handle(T)(ref T[] field, string memberName, string value, ErrorSink errorSink) +if (!is(immutable T == immutable char)) +{ + value = value.strip(); + if ((value[0] != '[') ^ (value[$ - 1] != ']')) { + errorSink.error("Setting ", memberName, " missmatch of [ and ]"); + return false; + } + + string[] values; + if (value[0] == '[') { + assert(value[$ - 1] == ']'); + value = value[1 .. $ - 1]; + values = value.split(','); + } else { + values = [ value ]; + } + + bool any_errors = false; + field = []; + foreach (singleValue; values) { + T thisValue; + if (!handle(thisValue, memberName, singleValue, errorSink)) { + any_errors = true; + continue; + } + field ~= thisValue; + } + + return !any_errors; +} + +template PossibleValues (T) { + static if (is(T == FeVersion)) { + enum PossibleValues = "2XXX"; + } else static if (is(T == string)) { + enum PossibleValues = ""; + } else static if (is(T == bool)) { + enum PossibleValues = "true or false"; + } else { + enum PossibleValues = (){ + string result; + alias members = __traits(allMembers, T); + + result ~= members[0]; + foreach(member; members[1..$]) { + result ~= ", "; + result ~= member; + } + + return result; + }(); + } +} + +template TargetType (T) { + static if (__traits(isScalar, T)) + alias TargetType = T; + else static if (is(T == FeVersion)) + alias TargetType = int; + else static if (is(T == string)) + alias TargetType = T; + else + static assert(false, "Unknown type " ~ T.stringof); +} + + +void parseSuccess(out TestConfig config, out CaptureErrorSink sink, string content) { + sink = new CaptureErrorSink(); + try { + config = parseConfig(content, sink); + } catch (Exception e) { + assert(false, "Parsing failed with error messages: " ~ sink.toString()); + } +} + +void parseFailure(out CaptureErrorSink sink, string content) { + sink = new CaptureErrorSink(); + try { + const _ = parseConfig(content, sink); + } catch (Exception e) { + return; + } + assert(false, "Parsing did not fail as expected"); +} + +unittest { + TestConfig config; + CaptureErrorSink sink; + parseSuccess(config, sink, ` + dub_command = test + os = [ linux,windows, osx] + dc_backend = [dmd, gdc,ldc] + dub_config = cappy-barry + + dlang_fe_version_min = 2108 + # A comment + # and one with spaces + locks=[XX,YY] + + dub_build_type = foo + + expect_nonzero = true + extra_dub_args = [ -f, -b ] + + must_be_run_alone = true + `); + + assert(config.dc_backend == [DcBackend.dmd, DcBackend.gdc, DcBackend.ldc]); + assert(config.os == [Os.linux, Os.windows, Os.osx]); + assert(config.dub_command == [ DubCommand.test ]); + assert(config.dlang_fe_version_min == 2108); + assert(config.dub_config == "cappy-barry"); + assert(config.locks == ["XX", "YY"]); + assert(config.dub_build_type == "foo"); + assert(config.expect_nonzero); + assert(config.extra_dub_args == ["-f", "-b"]); + assert(config.must_be_run_alone); + assert(sink.empty); +} + +unittest { + TestConfig config; + CaptureErrorSink sink; + parseSuccess(config, sink, ` +dub_command = build + +dc_backend = [gdc] +`); + + assert(config.dc_backend == [DcBackend.gdc]); + assert(config.dub_command == [ DubCommand.build ]); + assert(config.os == []); + assert(config.dlang_fe_version_min == 0); + assert(sink.empty); +} + +unittest { + CaptureErrorSink sink; + parseFailure(sink, `dub_command = foo_bar_baz`); + assert(sink.errors.length == 1); + assert(sink.errors[0].canFind("dub_command")); + assert(sink.errors[0].canFind("foo_bar_baz")); + + assert(sink.errors[0].canFind("run")); + assert(sink.errors[0].canFind("build")); + assert(sink.errors[0].canFind("test")); +} + +unittest { + CaptureErrorSink sink; + parseFailure(sink, `strace = [boo]`); + assert(sink.errors.length == 1); + assert(sink.errors[0].canFind("strace")); + + assert(sink.errors[0].canFind("dub_command")); + assert(sink.errors[0].canFind("dlang_fe_version_min")); + assert(sink.errors[0].canFind("os")); + assert(sink.errors[0].canFind("dc_backend")); +} + +unittest { + CaptureErrorSink sink; + parseFailure(sink, `os = linux]`); + assert(sink.errors.length == 1); + assert(sink.errors[0].canFind("os")); +} + +unittest { + CaptureErrorSink sink; + TestConfig config; + parseSuccess(config, sink, `os = [linux, linux]`); + + assert(sink.empty); + assert(config.os == [Os.linux, Os.linux]); +} + +unittest { + CaptureErrorSink sink; + parseFailure(sink, `dc_backend = [gdmd]`); + + assert(sink.errors.length == 1); + assert(sink.errors[0].canFind("dc_backend")); + assert(sink.errors[0].canFind("gdmd")); +} + +unittest { + CaptureErrorSink sink; + parseFailure(sink, `dc_backend = [ldmd2, gdmd, ldc2]`); + + assert(sink.errors.length == 3); + assert(sink.errors[0].canFind("dc_backend")); + assert(sink.errors[0].canFind("ldmd2")); + assert(sink.errors[1].canFind("dc_backend")); + assert(sink.errors[1].canFind("gdmd")); + assert(sink.errors[2].canFind("dc_backend")); + assert(sink.errors[2].canFind("ldc2")); +} + +unittest { + CaptureErrorSink sink; + parseFailure(sink, `dlang_fe_version_min = 2.109`); + + assert(sink.errors.length == 1); + assert(sink.errors[0].canFind("2.109")); + assert(sink.errors[0].canFind("2XXX")); +} + +unittest { + CaptureErrorSink sink; + parseFailure(sink, `dlang_fe_version_min = 2.foo`); + + assert(sink.errors.length == 1); + assert(sink.errors[0].canFind("2.foo")); +} + +unittest { + CaptureErrorSink sink; + parseFailure(sink, `dlang_fe_version_min = garbage`); + + assert(sink.errors.length == 1); + assert(sink.errors[0].canFind("garbage")); +} + +unittest { + TestConfig config; + CaptureErrorSink sink; + parseSuccess(config, sink, `dub_command = [build, test]`); + + assert(config.dub_command == [DubCommand.build, DubCommand.test]); +} + +unittest { + CaptureErrorSink sink; + parseFailure(sink, `expect_nonzero = 1`); + + assert(sink.errors.length == 1); + assert(sink.errors[0].canFind("1")); + assert(sink.errors[0].canFind("true")); + assert(sink.errors[0].canFind("false")); +} From 576da19be78953fe771a541a77a0d14577322444 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Wed, 23 Jul 2025 23:03:53 +0300 Subject: [PATCH 002/187] common Signed-off-by: Andrei Horodniceanu --- test/new_tests/common/dub.json | 5 + test/new_tests/common/source/common.d | 142 ++++++++++++++++++++++++++ 2 files changed, 147 insertions(+) create mode 100644 test/new_tests/common/dub.json create mode 100644 test/new_tests/common/source/common.d diff --git a/test/new_tests/common/dub.json b/test/new_tests/common/dub.json new file mode 100644 index 0000000000..f0da51915d --- /dev/null +++ b/test/new_tests/common/dub.json @@ -0,0 +1,5 @@ +{ + "name": "common", + "license": "MIT", + "targetType": "sourceLibrary" +} diff --git a/test/new_tests/common/source/common.d b/test/new_tests/common/source/common.d new file mode 100644 index 0000000000..db73c5e12a --- /dev/null +++ b/test/new_tests/common/source/common.d @@ -0,0 +1,142 @@ +module common; + +import core.stdc.stdio; +import std.parallelism; +import std.process; +import std.stdio : File; +import std.string; + +void log (const(char)[][] args...) { + printImpl("INFO", args); +} + +void logError (const(char)[][] args...) { + printImpl("ERROR", args); +} + +void die (const(char)[][] args...) { + printImpl("FAIL", args); + throw new Exception("test failed"); +} + +void skip (const(char)[][] args...) { + printImpl("SKIP", args); + throw new Exception("test skipped"); +} + +version(Posix) +immutable DotExe = ""; +else +immutable DotExe = ".exe"; + +immutable string dub; +immutable string dubHome; + +shared static this() { + import std.file; + import std.path; + dub = environment["DUB"]; + dubHome = getcwd.buildPath("dub"); + environment["DUB_HOME"] = dubHome; +} + +struct ProcessT { + string stdout(){ + if (stdoutTask is null) + throw new Exception("Trying to access stdout but it wasn't redirected"); + return stdoutTask.yieldForce; + } + string stderr(){ + if (stderrTask is null) + throw new Exception("Trying to access stderr but it wasn't redirected"); + return stderrTask.yieldForce; + } + string[] stdoutLines() { + return stdout.splitLines(); + } + string[] stderrLines() { + return stderr.splitLines(); + } + File stdin() { return p.stdin; } + + int wait() { + return p.pid.wait; + } + + Pid pid() { return p.pid; } + + this(ProcessPipes p, Redirect redirect, bool quiet = false) { + this.p = p; + this.redirect = redirect; + this.quiet = quiet; + + if (redirect & Redirect.stdout) { + this.stdoutTask = task!linesImpl(p.stdout, quiet); + this.stdoutTask.executeInNewThread(); + } + if (redirect & Redirect.stderr) { + this.stderrTask = task!linesImpl(p.stderr, quiet); + this.stderrTask.executeInNewThread(); + } + } + + ~this() { + if (stdoutTask) + stdoutTask.yieldForce; + if (stderrTask) + stderrTask.yieldForce; + } + + ProcessPipes p; +private: + Task!(linesImpl, File, bool)* stdoutTask; + Task!(linesImpl, File, bool)* stderrTask; + + Redirect redirect; + bool quiet; + bool stdoutDone; + bool stderrDone; + + static string linesImpl(File file, bool quiet) { + import std.typecons; + + string result; + foreach (line; file.byLine(Yes.keepTerminator)) { + if (!quiet) + log(line.chomp); + result ~= line; + } + file.close(); + return result; + } +} + +ProcessT teeProcess( + const string[] args, + Redirect redirect = Redirect.all, + const string[string] env = null, + Config config = Config.none, + const char[] workDir = null, +) { + return ProcessT(pipeProcess(args, redirect, env, config, workDir), redirect); +} + +ProcessT teeProcessQuiet( + const string[] args, + Redirect redirect = Redirect.all, + const string[string] env = null, + Config config = Config.none, + const char[] workDir = null, +) { + return ProcessT(pipeProcess(args, redirect, env, config, workDir), redirect, true); +} + +private: + +void printImpl (string header, const(char)[][] args...) { + printf("[%.*s]: ", cast(int)header.length, header.ptr); + foreach (arg; args) + printf("%.*s", cast(int)arg.length, arg.ptr); + fputc('\n', stdout); + fflush(stdout); +} From ba2ff96304097605c8605c5b0a23771bfe3d933b Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Wed, 23 Jul 2025 23:04:07 +0300 Subject: [PATCH 003/187] .gitignore Signed-off-by: Andrei Horodniceanu --- test/.gitignore | 2 ++ test/new_tests/.gitignore | 11 +++++++++++ test/new_tests/extra/.gitignore | 7 +++++++ 3 files changed, 20 insertions(+) create mode 100644 test/new_tests/.gitignore create mode 100644 test/new_tests/extra/.gitignore diff --git a/test/.gitignore b/test/.gitignore index cfe8d612fc..bc2a8bc176 100644 --- a/test/.gitignore +++ b/test/.gitignore @@ -67,3 +67,5 @@ version-filters-source-dep/version-filters-source-dep version-filters/version-filters version-spec/newfoo/foo-test-application version-spec/oldfoo/foo-test-application + +!new_tests/* diff --git a/test/new_tests/.gitignore b/test/new_tests/.gitignore new file mode 100644 index 0000000000..5a6d94c310 --- /dev/null +++ b/test/new_tests/.gitignore @@ -0,0 +1,11 @@ +test.log +*/* +!*/dub.json +!*/dub.sdl +!*/package.json +!*/run.d +!*/run.sh +!*/source +!*/.gitignore +!*/test.config +!extra/* diff --git a/test/new_tests/extra/.gitignore b/test/new_tests/extra/.gitignore new file mode 100644 index 0000000000..7eb300fdb3 --- /dev/null +++ b/test/new_tests/extra/.gitignore @@ -0,0 +1,7 @@ +* +!/*.d +!/*/ +!/*/dub.json +!/*/dub.sdl +!/*/source/ +!/*/.gitignore \ No newline at end of file From 0311978b28fbc3d648543a7a5952c055fa729c8c Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Mon, 14 Jul 2025 19:51:19 +0300 Subject: [PATCH 004/187] Add test README.md Signed-off-by: Andrei Horodniceanu --- test/dub-as-a-library-cwd.sh | 3 - test/new_tests/README.md | 305 +++++++++++++++++++++++++++++++++++ 2 files changed, 305 insertions(+), 3 deletions(-) delete mode 100755 test/dub-as-a-library-cwd.sh create mode 100644 test/new_tests/README.md diff --git a/test/dub-as-a-library-cwd.sh b/test/dub-as-a-library-cwd.sh deleted file mode 100755 index e0faea2cc5..0000000000 --- a/test/dub-as-a-library-cwd.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash -. $(dirname "${BASH_SOURCE[0]}")/common.sh -$DUB --root="$CURR_DIR/dub-as-a-library-cwd" diff --git a/test/new_tests/README.md b/test/new_tests/README.md new file mode 100644 index 0000000000..e3a424809c --- /dev/null +++ b/test/new_tests/README.md @@ -0,0 +1,305 @@ +# For test writers + +The short version of the process is: + +1. Make a new directory under test +2. (optionally) write a test.config if you need +3. Invoke `dub` in your code with any arguments/paths you need and check the generated files or output; or anything else you need to test. + +Feel free to peek at other tests for inspiration. + +# For test runners + +Run: +``` +DC= ./bin/dub run --root test/run_unittest -- +``` + +Where: +- `` is replaced by your desired D compiler. + The supported variants are: + - `dmd` + - `ldc2` + - `ldmd2` + - `gdmd` (only very recent of the `gdmd` script work, the underlying `gdc` can be older) + + `gdc` is not supported. + +- `` + Can contain the switches: + - `-j` for how many tests to run in parallel + - `-v` in order to show the full output of each test to the console, rather than only *starting* and *finished* lines. The full output is still saved to the `test.log` file so you can safely pass this switch and still have the full output available in case of a failure. + - `--color[=]` To turn on/off color output for log lines and the dub invocations. Note that this leads to color output being saved in the `test.log` file + + You can also pass any amount of glob patterns in order to select which tests to run. + It is an error not to select any tests so if you misspell the pattern the runner will complain. + +As an example, the following invocation: +``` +DC=/usr/bin/dmd-2.111 ./bin/dub run --root test/run_unittest -- -j4 --color=false -v '1-exec-*' +``` +runs the all the tests that match `1-exec-*` (currently those are `1-exec-simple` and `1-exec-simple-package-json`), without color but with full output, with 4 threads. + +# Advanced test writing + +## The `test.config` file + +A summary of all the settings: +``` +# Test requirements +os = [linux, windows, osx] +dc_backend = [gdc, dmd, ldc] +dlang_fe_version_min = 2108 + +# CLI switches passed to dub when running the test +dub_command = build +dub_config = myconfig +dub_build_type = mybuild +extra_dub_args = [ --, -my-app-flag-1 ] + +# Synchronization +locks = [ 1-dynLib-simple ] +must_be_run_alone = true + +# Misc +expect_nonzero = false +``` + +The syntax is very basic: +- empty or whitespace-only lines are ignored +- comments start with `#` and can only be placed at the start of a line +- Other lines are treated as `key = value` assignments. + +The value can be an array denoted by the `[` and `]` characters, with elements separated by commas. +The value can also be a simple string. +Quotes are not supported, nor can you span an array multiple lines. + +The accepted keys are the members of the `TestConfig` struct in [test_config.d](/test/run_unittest/source/run_unittest/test_config.d) + +The accepted values for each setting are based on their D type: +- `enum` accepts any of the names of the `enum`'s members +- `string` accepts any value +- `bool` accept only `true` and `false` + +Arrays accept any number of their element's type. + +As a shorthand, if an array contains only one element, you can skip writing the `[]` around the value. +For example, the following two lines are equivalent: +``` +os = windows +os = [ windows ] +``` + +What follows are detailed descriptions for each setting key: + +#### `os` + +Restricts the test to only run on selected platforms. + +For example: +``` +os = [linux, osx] +``` +will only run the test of `Linux` and `MacOS` platforms. + +### `dc_backend` + +Required that the compiler backend be one of the listed values. + +For example: +``` +dc_backend = [dmd, ldc] +``` +will only run the test with `dmd`, `ldc2`, or `ldmd2`, but not with `gdmd`. + +If you need to disallow `ldc2` but not `ldmd2` then you will need to do so pragmatically inside your test code. +The `common.skip` helper function can be used for this purpose. + +### `dlang_fe_version_min` + +Restrict the compiler frontend version to be higher or equal to the passed value. +The frontend version is the version of the `dmd` code each compiler contains. +For example `gdmd-14` has a FE version of `2.108`. + +Example: +``` +dlang_fe_version_min = 2101 +``` + +Use this setting if you are testing a new feature of the compiler, otherwise try to make your test work with older compilers by not using very recent language features. + +### `dub_command` + +This selects how to run your test. +Possible values are: +- `build` +- `test` +- `run` + +Each value translates to a `dub build`, `dub test`, or, `dub run` invocation. + +This setting is an array so you can pass multiple of the above values, in case you need the test to be built multiple times. + +The default value is `run`. + +For example: +``` +dub_command = build +``` +will not run your test, it will only call `dub build` and interpret a zero exit status as success. + +### `dub_config` + +This selects the package configuration (the `--config` dub switch). + +By default, no value is selected and the switch is not passed to dub. + +For example: +``` +dub_config = myconfig +``` +will run your test with `dub run --config myconfig` + +### `dub_build_type` + +Similarly to `dub_config`, this selects what is passed to the `--build` switch. + +By default, no value is passed. + +For example: +``` +dub_build_type = release +``` +will result in your test being run as `dub run --build release` + +### `extra_dub_args` + +This is a catch-all setting for any specific switches you want to pass to dub. + +For example: +``` +extra_dub_args = [ --, --my-switch ] +``` +will run the test as `dub run -- --my-switch`. + +### `locks` + +This setting is used to prevent tests that use the same resource/dependency from running at the same time. +While the runner tries to isolate each test by passing a specific `DUB_HOME` directory in order to avoid concurrent build of the same (named) package this is not always possible. + +For example, if three tests depend on the same library in `extra/` those could not be run at the same time. +In that scenario, each of those three tests would need to have a `locks` setting with the same value, say `locks = extra/mydep`. +The value doesn't matter, so long as it matches between the three `test.config` files. +Do try, however, to use a self-explanatory name, in order to make it obvious why the tests can't be run in parallel. + +As a special case, the runner always adds the directory name of the test to the `locks` setting to facilitate the few cases in which a test depends on another test. + +For example, if you had two tests `1-lib` and `2-exec-dep-lib`, with `2-exec-dep-lib` having a dependency in its `dub.json` for `1-lib` then you can solve this with a single `test.config`. +It would be placed in the `2-exec-dep-lib` directory and contain: +``` +locks = [ 1-lib ] +``` + +### `must_be_run_alone` + +Similarly to `locks` this setting controls how a test is scheduled with regards to other tests. +It accepts only a `true` or `false` value and, if the value is `true`, like the name suggests, the test will only be run if no other tests are being run. + +It stands to reason that you should only use this setting as a last resort, in case the functionality you are testing actively interferes with the test setup. +An example of such an operation may involve renaming the `dub` executable back and forth. + +Example: +``` +must_be_run_alone = true +``` + +### `expect_nonzero` + +This setting controls the default behavior of deciding the test success/failure based on its exit status. +Normally a zero exit status means that the test completed successfully and a non-zero status means that something failed. +You can switch this behavior with this boolean setting and require that your test exits with a non-zero status in order to be declared successful. + +Note that it is still possible to explicitly fail a test by printing a `[FAIL]: ` line in the output of your program (which is what the `common.die` helper does). +In such a case the test is still marked as a failure, even if `expect_nonzero` is set to `true`. + +Example: +``` +expect_nonzero = true +``` + +## General guarantees + +- `DUB` exists in the environment +- `DC` exists in the environment +- Your test program's working directory is its test folder +- `DUB_HOME` being set and pointing to a test-specific directory. + This allows you to freely build/fetch/remove packages without affecting the user's setup or interfere with other tests. +- `CURR_DIR` exists in the environment and point to the [test](/test) directory + +## General requirements + +### Try to respect `DFLAGS` + +Try to respect the `DFLAGS` environment variable and not overwrite it, as it is meant for users to pass arguments possibly required by their setup. + +If you test fails with any `DFLAGS` then it is acceptable to delete its value. + +### Don't overwrite `etc/dub/settings.json` + +This path, relative to the root of this repository, is meant for users to control `dub` settings. + +### Avoid short names for packages + +Don't have top-level packages (i.e. directly inside [test](/test)) with short or common names. +If two test have the same name (for example `test`) they risk being built at the same time and trigger race conditions between compiler processes. +Use names like `issue1202-test` and `issue1404-test`. + +Note that it is fine to use names such as `test` when generating or building packages from inside your test, since at that point the test will have a separate `DUB_HOME` which will be local to your test so no conflicts can arise. + +## Other notes + +### Output format + +The test runner picks up lines that start with: +- `[INFO]: ` +- `[WARN]: ` +- `[ERROR]: ` +- `[FAIL]: ` +- `[SKIP]: ` + +and either prints them with possible color or it marks the test as failed or skipped. + +The `common` package provides convenience wrappers for these but you're free to print them directly if its easier. + +`[FAIL]:` and `[SKIP]:` use the remaining portion of the line to tell the user why the test was skipped so try to print something meaningful. + +### Directory structure + +The common pattern is that each test is a folder inside `/test/`. +If your test needs some static files they are usually placed inside `sample/`. +If your test dynamically generated some data it is usually placed in a local `test/` subdirectory (for example `/test/custom-unittest/test`). +A `dub` subdirectory inside each test directory is also generated and `DUB_HOME` is set to point to it when the test is run. + +### .gitignore usage + +The default policy is black-list all, white-list as needed. +Try to follow this when you unmask your test's files, which you probably have to do when adding anything other that a `dub.json` and a `source/` directory. + +### cleaning up garbage files + +It's fine if your tests leave temporary files laying around in git-ignored paths. +You don't have to explicitly clean up everything as the user is entrusted to run `git clean -fdx` if they want to get rid of all the junk. + +It is, however, important to perform all the necessary cleanup at the start of your test. +You can't assume that a previous invocation completed successfully or unsuccessfully so try to always start with a clean environment and manually reset all generated files or directories. + +# Advanced test running + +You can configure setting with either the `DFLAGS` environment variable or the `etc/dub/settings.json` file (relative to the root of this repository) + +If you change `DFLAGS` take a note that `gdmd` may fail to build some tests unless you pass it `-q,-Wno-error -allinst`, so be sure to also include these flags. + +The `dub/settings.json` file can be used to configure custom package registries which would allow you to run (some of) the tests without internet access. +It can also give you control of all the tests' inputs. +However, a few tests do fail without internet access and which packages would need to be manually downloaded is not clearly stated. +With some hacking it can be done but if you rely on this functionality feel free to open an issue if you want the situation to improve. From 8cb16ab3838eccc8a008758179b5300c8352cb47 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Wed, 23 Jul 2025 23:04:37 +0300 Subject: [PATCH 005/187] 0-init-fail-json Signed-off-by: Andrei Horodniceanu --- test/0-init-fail-json.script.d | 36 -------------------- test/new_tests/0-init-fail-json/dub.sdl | 2 ++ test/new_tests/0-init-fail-json/source/app.d | 21 ++++++++++++ 3 files changed, 23 insertions(+), 36 deletions(-) delete mode 100644 test/0-init-fail-json.script.d create mode 100644 test/new_tests/0-init-fail-json/dub.sdl create mode 100644 test/new_tests/0-init-fail-json/source/app.d diff --git a/test/0-init-fail-json.script.d b/test/0-init-fail-json.script.d deleted file mode 100644 index d62938536b..0000000000 --- a/test/0-init-fail-json.script.d +++ /dev/null @@ -1,36 +0,0 @@ -/+ dub.sdl: - name "0-init-fail-json" - dependency "common" path="./common" - +/ - -module _0_init_fail_json; - -import std.file : exists, remove; -import std.path : buildPath; -import std.process : environment, spawnProcess, wait; - -import common; - -int main() -{ - enum packname = "0-init-fail-pack"; - enum deps = "logger PACKAGE_DONT_EXIST"; // would be very unlucky if it does exist... - - auto dub = environment.get("DUB"); - if (!dub.length) - die(`Environment variable "DUB" must be defined to run the tests.`); - - //** if $$DUB init -n $packname $deps -f json 2>/dev/null; then - if (!spawnProcess([dub, "init", "-n", packname, deps, "-f", "json"]).wait) - die("Init with unknown non-existing dependency expected to fail"); - - //** if [ -e $packname/dub.json ]; then # package is there, it should have failed - const filepath = buildPath(packname, "dub.json"); - if (filepath.exists) - { - remove(packname); - die(filepath ~ " was not created"); - } - - return 0; -} diff --git a/test/new_tests/0-init-fail-json/dub.sdl b/test/new_tests/0-init-fail-json/dub.sdl new file mode 100644 index 0000000000..66dff5fd4a --- /dev/null +++ b/test/new_tests/0-init-fail-json/dub.sdl @@ -0,0 +1,2 @@ +name "0-init-fail-json" +dependency "common" path="../common" diff --git a/test/new_tests/0-init-fail-json/source/app.d b/test/new_tests/0-init-fail-json/source/app.d new file mode 100644 index 0000000000..3879a868aa --- /dev/null +++ b/test/new_tests/0-init-fail-json/source/app.d @@ -0,0 +1,21 @@ +import std.file : exists, remove; +import std.path : buildPath; +import std.process : environment, spawnProcess, wait; + +import common; + +void main() +{ + enum packname = "0-init-fail-pack"; + immutable deps = ["logger", "PACKAGE_DONT_EXIST"]; // would be very unlucky if it does exist... + + if (!spawnProcess([dub, "init", "-n", packname] ~ deps ~ [ "-f", "json"]).wait) + die("Init with unknown non-existing dependency expected to fail"); + + const filepath = buildPath(packname, "dub.json"); + if (filepath.exists) + { + remove(packname); + die(filepath, " was not created"); + } +} From a25064dd5be170b57d8f555532c695f193d2fa21 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Wed, 23 Jul 2025 23:05:07 +0300 Subject: [PATCH 006/187] 0-init-fail Signed-off-by: Andrei Horodniceanu --- test/0-init-fail.sh | 18 ------------------ test/new_tests/0-init-fail/dub.sdl | 2 ++ test/new_tests/0-init-fail/source/app.d | 21 +++++++++++++++++++++ 3 files changed, 23 insertions(+), 18 deletions(-) delete mode 100755 test/0-init-fail.sh create mode 100644 test/new_tests/0-init-fail/dub.sdl create mode 100644 test/new_tests/0-init-fail/source/app.d diff --git a/test/0-init-fail.sh b/test/0-init-fail.sh deleted file mode 100755 index c440a57818..0000000000 --- a/test/0-init-fail.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env bash - -. $(dirname "${BASH_SOURCE[0]}")/common.sh -packname="0-init-fail-pack" -deps="logger PACKAGE_DONT_EXIST" # would be very unlucky if it does exist... - -if $DUB init -n $packname $deps 2>/dev/null; then - die $LINENO 'Init with unknown non-existing dependency expected to fail' -fi - -function cleanup { - rm -rf $packname -} - -if [ -e $packname/dub.sdl ]; then # package is there, it should have failed - cleanup - die $LINENO "$packname/dub.sdl was not created" -fi diff --git a/test/new_tests/0-init-fail/dub.sdl b/test/new_tests/0-init-fail/dub.sdl new file mode 100644 index 0000000000..465201c13c --- /dev/null +++ b/test/new_tests/0-init-fail/dub.sdl @@ -0,0 +1,2 @@ +name "0-init-fail" +dependency "common" path="../common" diff --git a/test/new_tests/0-init-fail/source/app.d b/test/new_tests/0-init-fail/source/app.d new file mode 100644 index 0000000000..dfe8c7a1a3 --- /dev/null +++ b/test/new_tests/0-init-fail/source/app.d @@ -0,0 +1,21 @@ +import std.file : exists, remove; +import std.path : buildPath; +import std.process : environment, spawnProcess, wait; + +import common; + +void main() +{ + enum packname = "0-init-fail-pack"; + immutable deps = ["logger", "PACKAGE_DONT_EXIST"]; // would be very unlucky if it does exist... + + if (!spawnProcess([dub, "init", "-n", packname] ~ deps).wait) + die("Init with unknown non-existing dependency expected to fail"); + + const filepath = buildPath(packname, "dub.sdl"); + if (filepath.exists) + { + remove(packname); + die(filepath ~ " was not created"); + } +} From 3e2ef6d21c67c878bdd1a1c0e038b9455cbf49ac Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Wed, 23 Jul 2025 23:07:17 +0300 Subject: [PATCH 007/187] 0-init-interactive Signed-off-by: Andrei Horodniceanu --- test/0-init-interactive.sh | 47 -------------- test/new_tests/0-init-interactive/.gitignore | 2 + test/new_tests/0-init-interactive/dub.sdl | 2 + .../exp/default_name.dub.sdl} | 2 +- .../0-init-interactive/exp/dub.json} | 0 .../0-init-interactive/exp/dub.sdl} | 0 .../exp/license_gpl3.dub.sdl} | 0 .../exp/license_mpl2.dub.sdl} | 0 .../exp/license_proprietary.dub.sdl} | 0 .../new_tests/0-init-interactive/source/app.d | 63 +++++++++++++++++++ 10 files changed, 68 insertions(+), 48 deletions(-) delete mode 100755 test/0-init-interactive.sh create mode 100644 test/new_tests/0-init-interactive/.gitignore create mode 100644 test/new_tests/0-init-interactive/dub.sdl rename test/{0-init-interactive.default_name.dub.sdl => new_tests/0-init-interactive/exp/default_name.dub.sdl} (72%) rename test/{0-init-interactive.dub.json => new_tests/0-init-interactive/exp/dub.json} (100%) rename test/{0-init-interactive.dub.sdl => new_tests/0-init-interactive/exp/dub.sdl} (100%) rename test/{0-init-interactive.license_gpl3.dub.sdl => new_tests/0-init-interactive/exp/license_gpl3.dub.sdl} (100%) rename test/{0-init-interactive.license_mpl2.dub.sdl => new_tests/0-init-interactive/exp/license_mpl2.dub.sdl} (100%) rename test/{0-init-interactive.license_proprietary.dub.sdl => new_tests/0-init-interactive/exp/license_proprietary.dub.sdl} (100%) create mode 100644 test/new_tests/0-init-interactive/source/app.d diff --git a/test/0-init-interactive.sh b/test/0-init-interactive.sh deleted file mode 100755 index b46b5cd33e..0000000000 --- a/test/0-init-interactive.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/usr/bin/env bash - -. $(dirname "${BASH_SOURCE[0]}")/common.sh -packname="0-init-interactive" - -function cleanup { - rm -rf $packname -} - -function runTest { - local inp=$1 - local comp=$2 - local dub_ext=${comp##*.} - local outp=$(echo -e $inp | $DUB init $packname) - if [ ! -e $packname/dub.$dub_ext ]; then # it failed - cleanup - die $LINENO "No dub.$dub_ext file has been generated for test $comp with input '$inp'. Output: $outp" - fi - if ! diff $packname/dub.$dub_ext "$CURR_DIR"/$comp; then - cleanup - die $LINENO "Contents of generated dub.$dub_ext does not match $comp" - fi - cleanup -} - -# sdl package format -runTest '1\ntest\ndesc\nauthor\ngpl\ncopy\n\n' 0-init-interactive.dub.sdl -# select package format out of bounds -runTest '3\n1\ntest\ndesc\nauthor\ngpl\ncopy\n\n' 0-init-interactive.dub.sdl -# select package format not numeric, but in list -runTest 'sdl\ntest\ndesc\nauthor\ngpl\ncopy\n\n' 0-init-interactive.dub.sdl -# selected value not numeric and not in list -runTest 'sdlf\n1\ntest\ndesc\nauthor\ngpl\ncopy\n\n' 0-init-interactive.dub.sdl -# default name -runTest '1\n\ndesc\nauthor\ngpl\ncopy\n\n' 0-init-interactive.default_name.dub.sdl -# json package format -runTest '2\ntest\ndesc\nauthor\ngpl\ncopy\n\n' 0-init-interactive.dub.json -# default package format -runTest '\ntest\ndesc\nauthor\ngpl\ncopy\n\n' 0-init-interactive.dub.json -# select license -runTest '1\ntest\ndesc\nauthor\n6\n3\ncopy\n\n' 0-init-interactive.license_gpl3.dub.sdl -# select license (with description) -runTest '1\ntest\ndesc\nauthor\n9\n3\ncopy\n\n' 0-init-interactive.license_mpl2.dub.sdl -# select license out of bounds -runTest '1\ntest\ndesc\nauthor\n21\n6\n3\ncopy\n\n' 0-init-interactive.license_gpl3.dub.sdl -# default license -runTest '1\ntest\ndesc\nauthor\n\ncopy\n\n' 0-init-interactive.license_proprietary.dub.sdl diff --git a/test/new_tests/0-init-interactive/.gitignore b/test/new_tests/0-init-interactive/.gitignore new file mode 100644 index 0000000000..4f2f404e33 --- /dev/null +++ b/test/new_tests/0-init-interactive/.gitignore @@ -0,0 +1,2 @@ +!/exp +!/exp/* \ No newline at end of file diff --git a/test/new_tests/0-init-interactive/dub.sdl b/test/new_tests/0-init-interactive/dub.sdl new file mode 100644 index 0000000000..ccd2866ae8 --- /dev/null +++ b/test/new_tests/0-init-interactive/dub.sdl @@ -0,0 +1,2 @@ +name "0-init-interactive" +dependency "common" path="../common" diff --git a/test/0-init-interactive.default_name.dub.sdl b/test/new_tests/0-init-interactive/exp/default_name.dub.sdl similarity index 72% rename from test/0-init-interactive.default_name.dub.sdl rename to test/new_tests/0-init-interactive/exp/default_name.dub.sdl index 7b8f8ba0fd..34f3c864f1 100644 --- a/test/0-init-interactive.default_name.dub.sdl +++ b/test/new_tests/0-init-interactive/exp/default_name.dub.sdl @@ -1,4 +1,4 @@ -name "0-init-interactive" +name "new-package" description "desc" authors "author" copyright "copy" diff --git a/test/0-init-interactive.dub.json b/test/new_tests/0-init-interactive/exp/dub.json similarity index 100% rename from test/0-init-interactive.dub.json rename to test/new_tests/0-init-interactive/exp/dub.json diff --git a/test/0-init-interactive.dub.sdl b/test/new_tests/0-init-interactive/exp/dub.sdl similarity index 100% rename from test/0-init-interactive.dub.sdl rename to test/new_tests/0-init-interactive/exp/dub.sdl diff --git a/test/0-init-interactive.license_gpl3.dub.sdl b/test/new_tests/0-init-interactive/exp/license_gpl3.dub.sdl similarity index 100% rename from test/0-init-interactive.license_gpl3.dub.sdl rename to test/new_tests/0-init-interactive/exp/license_gpl3.dub.sdl diff --git a/test/0-init-interactive.license_mpl2.dub.sdl b/test/new_tests/0-init-interactive/exp/license_mpl2.dub.sdl similarity index 100% rename from test/0-init-interactive.license_mpl2.dub.sdl rename to test/new_tests/0-init-interactive/exp/license_mpl2.dub.sdl diff --git a/test/0-init-interactive.license_proprietary.dub.sdl b/test/new_tests/0-init-interactive/exp/license_proprietary.dub.sdl similarity index 100% rename from test/0-init-interactive.license_proprietary.dub.sdl rename to test/new_tests/0-init-interactive/exp/license_proprietary.dub.sdl diff --git a/test/new_tests/0-init-interactive/source/app.d b/test/new_tests/0-init-interactive/source/app.d new file mode 100644 index 0000000000..740e2b9f4b --- /dev/null +++ b/test/new_tests/0-init-interactive/source/app.d @@ -0,0 +1,63 @@ +import common; + +void main() +{ + runTest("1\ntest\ndesc\nauthor\ngpl\ncopy\n\n", "dub.sdl"); + runTest("3\n1\ntest\ndesc\nauthor\ngpl\ncopy\n\n", "dub.sdl"); + runTest("sdl\ntest\ndesc\nauthor\ngpl\ncopy\n\n", "dub.sdl"); + runTest("sdlf\n1\ntest\ndesc\nauthor\ngpl\ncopy\n\n", "dub.sdl"); + runTest("1\n\ndesc\nauthor\ngpl\ncopy\n\n", "default_name.dub.sdl"); + runTest("2\ntest\ndesc\nauthor\ngpl\ncopy\n\n", "dub.json"); + runTest("\ntest\ndesc\nauthor\ngpl\ncopy\n\n", "dub.json"); + runTest("1\ntest\ndesc\nauthor\n6\n3\ncopy\n\n", "license_gpl3.dub.sdl"); + runTest("1\ntest\ndesc\nauthor\n9\n3\ncopy\n\n", "license_mpl2.dub.sdl"); + runTest("1\ntest\ndesc\nauthor\n21\n6\n3\ncopy\n\n", "license_gpl3.dub.sdl"); + runTest("1\ntest\ndesc\nauthor\n\ncopy\n\n", "license_proprietary.dub.sdl"); +} + +void runTest(string input, string expectedPath) { + import std.array; + import std.algorithm; + import std.range; + import std.process; + import std.file; + import std.path; + import std.string; + + immutable test = baseName(expectedPath); + immutable dub_ext = expectedPath[expectedPath.lastIndexOf(".") + 1 .. $]; + + const dir = "new-package"; + + if (dir.exists) rmdirRecurse(dir); + auto pipes = pipeProcess([dub, "init", dir], + Redirect.stdin | Redirect.stdout | Redirect.stderrToStdout); + scope(success) rmdirRecurse(dir); + + immutable escapedInput = format("%(%s%)", [input]); + pipes.stdin.writeln(input); + pipes.stdin.close(); + if (pipes.pid.wait != 0) { + die("Dub failed to generate init file for " ~ escapedInput); + } + + scope(failure) { + logError("You can find the generated files in ", absolutePath(dir)); + } + + if (!exists(dir ~ "/dub." ~ dub_ext)) { + logError("No dub." ~ dub_ext ~ " file has been generated for test " ~ test); + logError("with input " ~ escapedInput ~ ". Output:"); + foreach (line; pipes.stdout.byLine) + logError(line); + die("No dub." ~ dub_ext ~ " file has been found"); + } + + immutable got = readText(dir ~ "/dub." ~ dub_ext).replace("\r\n", "\n"); + immutable expPath = "exp/" ~ expectedPath; + immutable exp = expPath.readText.replace("\r\n", "\n"); + + if (got != exp) { + die("Contents of generated dub." ~ dub_ext ~ " does not match " ~ expPath); + } +} From c169d6969ed62774a2038c6bca47184cea3cadcb Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Wed, 23 Jul 2025 23:08:58 +0300 Subject: [PATCH 008/187] 0-init-multi-json Signed-off-by: Andrei Horodniceanu --- test/0-init-multi-json.sh | 27 ------------------- test/new_tests/0-init-multi-json/dub.sdl | 2 ++ test/new_tests/0-init-multi-json/source/app.d | 27 +++++++++++++++++++ 3 files changed, 29 insertions(+), 27 deletions(-) delete mode 100755 test/0-init-multi-json.sh create mode 100644 test/new_tests/0-init-multi-json/dub.sdl create mode 100644 test/new_tests/0-init-multi-json/source/app.d diff --git a/test/0-init-multi-json.sh b/test/0-init-multi-json.sh deleted file mode 100755 index 239c419cb3..0000000000 --- a/test/0-init-multi-json.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env bash - -. $(dirname "${BASH_SOURCE[0]}")/common.sh -packname="0-init-multi-pack" -deps="openssl logger" -type="vibe.d" - -$DUB init -n $packname $deps --type=$type -f json - -function cleanup { - rm -rf $packname -} - -if [ ! -e $packname/dub.json ]; then - die $LINENO '$packname/dub.json not created' -else # check if resulting dub.json has all dependencies in tow - deps="$deps vibe-d"; - IFS=" " read -a arr <<< "$deps" - for ele in "${arr[@]}" - do - if [ `grep -c "$ele" $packname/dub.json` -ne 1 ]; then #something went wrong - cleanup - die $LINENO "$ele not in $packname/dub.json" - fi - done - cleanup -fi diff --git a/test/new_tests/0-init-multi-json/dub.sdl b/test/new_tests/0-init-multi-json/dub.sdl new file mode 100644 index 0000000000..6de210c108 --- /dev/null +++ b/test/new_tests/0-init-multi-json/dub.sdl @@ -0,0 +1,2 @@ +name "0-init-multi-json" +dependency "common" path="../common" diff --git a/test/new_tests/0-init-multi-json/source/app.d b/test/new_tests/0-init-multi-json/source/app.d new file mode 100644 index 0000000000..8d1a828f7b --- /dev/null +++ b/test/new_tests/0-init-multi-json/source/app.d @@ -0,0 +1,27 @@ +import std.file : exists, readText, rmdirRecurse; +import std.path : buildPath; +import std.process : environment, spawnProcess, wait; + +import common; + +void main() +{ + enum packname = "test-package"; + immutable deps = ["openssl", "logger"]; + enum type = "vibe.d"; + + if(packname.exists) rmdirRecurse(packname); + spawnProcess([dub, "init", "-n", packname ] ~ deps ~ [ "--type", type, "-f", "json"]).wait; + + const filepath = buildPath(packname, "dub.json"); + if (!filepath.exists) + die("dub.json not created"); + + immutable got = readText(filepath); + foreach (dep; deps ~ type) { + import std.algorithm; + if (got.count(dep) != 1) { + die(dep, " not in " ~ filepath); + } + } +} From 1732fe78fffdcafa1c70b2a2eadafbae1485d0e1 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Wed, 23 Jul 2025 23:12:16 +0300 Subject: [PATCH 009/187] 0-init-multi Signed-off-by: Andrei Horodniceanu --- test/0-init-multi.sh | 28 ------------------------ test/new_tests/0-init-multi/dub.sdl | 2 ++ test/new_tests/0-init-multi/source/app.d | 27 +++++++++++++++++++++++ 3 files changed, 29 insertions(+), 28 deletions(-) delete mode 100755 test/0-init-multi.sh create mode 100644 test/new_tests/0-init-multi/dub.sdl create mode 100644 test/new_tests/0-init-multi/source/app.d diff --git a/test/0-init-multi.sh b/test/0-init-multi.sh deleted file mode 100755 index 8432b969c1..0000000000 --- a/test/0-init-multi.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env bash - -. $(dirname "${BASH_SOURCE[0]}")/common.sh -packname="0-init-multi-pack" -deps="openssl logger" -type="vibe.d" - -$DUB init -n $packname $deps --type=$type --format sdl - -function cleanup { - rm -rf $packname -} - -if [ ! -e $packname/dub.sdl ]; then - cleanup - die $LINENO 'No dub.sdl file has been generated.' -else # check if resulting dub.sdl has all dependencies in tow - deps="$deps vibe-d"; - IFS=" " read -a arr <<< "$deps" - for ele in "${arr[@]}" - do - if [ `grep -c "$ele" $packname/dub.sdl` -ne 1 ]; then #something went wrong - cleanup - die $LINENO "$ele not in $packname/dub.sdl" - fi - done - cleanup -fi diff --git a/test/new_tests/0-init-multi/dub.sdl b/test/new_tests/0-init-multi/dub.sdl new file mode 100644 index 0000000000..57395d2e1e --- /dev/null +++ b/test/new_tests/0-init-multi/dub.sdl @@ -0,0 +1,2 @@ +name "0-init-multi" +dependency "common" path="../common" diff --git a/test/new_tests/0-init-multi/source/app.d b/test/new_tests/0-init-multi/source/app.d new file mode 100644 index 0000000000..faf4a4206e --- /dev/null +++ b/test/new_tests/0-init-multi/source/app.d @@ -0,0 +1,27 @@ +import std.file : exists, readText, rmdirRecurse; +import std.path : buildPath; +import std.process : environment, spawnProcess, wait; + +import common; + +void main() +{ + enum packname = "test-package"; + immutable deps = ["openssl", "logger"]; + enum type = "vibe.d"; + + if(packname.exists) rmdirRecurse(packname); + spawnProcess([dub, "init", "-n", packname ] ~ deps ~ [ "--type", type, "-f", "sdl"]).wait; + + const filepath = buildPath(packname, "dub.sdl"); + if (!filepath.exists) + die("dub.sdl not created"); + + immutable got = readText(filepath); + foreach (dep; deps ~ type) { + import std.algorithm; + if (got.count(dep) != 1) { + die(dep, " not in " ~ filepath); + } + } +} From e45478a68d83b4d7c5c6cf08df5fd8b6514735b2 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sun, 13 Jul 2025 19:59:09 +0300 Subject: [PATCH 010/187] 0-init-simple Signed-off-by: Andrei Horodniceanu --- test/0-init-simple.sh | 16 ---------------- test/new_tests/0-init-simple/dub.sdl | 2 ++ test/new_tests/0-init-simple/source/app.d | 17 +++++++++++++++++ 3 files changed, 19 insertions(+), 16 deletions(-) delete mode 100755 test/0-init-simple.sh create mode 100644 test/new_tests/0-init-simple/dub.sdl create mode 100644 test/new_tests/0-init-simple/source/app.d diff --git a/test/0-init-simple.sh b/test/0-init-simple.sh deleted file mode 100755 index f4fee2eba6..0000000000 --- a/test/0-init-simple.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env bash - -. $(dirname "${BASH_SOURCE[0]}")/common.sh -packname="0-init-simple-pack" - -$DUB init -n $packname --format sdl - -function cleanup { - rm -rf $packname -} - -if [ ! -e $packname/dub.sdl ]; then # it failed - cleanup - die $LINENO 'No dub.sdl file has been generated.' -fi -cleanup diff --git a/test/new_tests/0-init-simple/dub.sdl b/test/new_tests/0-init-simple/dub.sdl new file mode 100644 index 0000000000..b353c56ece --- /dev/null +++ b/test/new_tests/0-init-simple/dub.sdl @@ -0,0 +1,2 @@ +name "0-init-simple" +dependency "common" path="../common" diff --git a/test/new_tests/0-init-simple/source/app.d b/test/new_tests/0-init-simple/source/app.d new file mode 100644 index 0000000000..61fc953fcc --- /dev/null +++ b/test/new_tests/0-init-simple/source/app.d @@ -0,0 +1,17 @@ +import std.file : exists, readText, rmdirRecurse; +import std.path : buildPath; +import std.process : environment, spawnProcess, wait; + +import common; + +void main() +{ + enum packname = "test-package"; + + if(packname.exists) rmdirRecurse(packname); + spawnProcess([dub, "init", "-n", packname, "--format", "sdl"]).wait; + + const filepath = buildPath(packname, "dub.sdl"); + if (!filepath.exists) + die("dub.sdl not created"); +} From 63bf5eb3ab49c62eba10eb9cafe4ab08238d5799 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sun, 13 Jul 2025 19:59:32 +0300 Subject: [PATCH 011/187] 0-init-simple-json Signed-off-by: Andrei Horodniceanu --- test/0-init-simple-json.sh | 16 ---------------- test/new_tests/0-init-simple-json/dub.sdl | 2 ++ test/new_tests/0-init-simple-json/source/app.d | 17 +++++++++++++++++ 3 files changed, 19 insertions(+), 16 deletions(-) delete mode 100755 test/0-init-simple-json.sh create mode 100644 test/new_tests/0-init-simple-json/dub.sdl create mode 100644 test/new_tests/0-init-simple-json/source/app.d diff --git a/test/0-init-simple-json.sh b/test/0-init-simple-json.sh deleted file mode 100755 index 2a7ec8a0cc..0000000000 --- a/test/0-init-simple-json.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env bash - -. $(dirname "${BASH_SOURCE[0]}")/common.sh -packname="0-init-simple-pack" - -$DUB init -n $packname -f json - -function cleanup { - rm -rf $packname -} - -if [ ! -e $packname/dub.json ]; then - cleanup - die $LINENO 'No dub.json file has been generated.' -fi -cleanup diff --git a/test/new_tests/0-init-simple-json/dub.sdl b/test/new_tests/0-init-simple-json/dub.sdl new file mode 100644 index 0000000000..205bf62051 --- /dev/null +++ b/test/new_tests/0-init-simple-json/dub.sdl @@ -0,0 +1,2 @@ +name "0-init-simple-json" +dependency "common" path="../common" diff --git a/test/new_tests/0-init-simple-json/source/app.d b/test/new_tests/0-init-simple-json/source/app.d new file mode 100644 index 0000000000..de0d500d2e --- /dev/null +++ b/test/new_tests/0-init-simple-json/source/app.d @@ -0,0 +1,17 @@ +import std.file : exists, readText, rmdirRecurse; +import std.path : buildPath; +import std.process : environment, spawnProcess, wait; + +import common; + +void main() +{ + enum packname = "test-package"; + + if(packname.exists) rmdirRecurse(packname); + spawnProcess([dub, "init", "-n", packname, "-f", "json"]).wait; + + const filepath = buildPath(packname, "dub.json"); + if (!filepath.exists) + die("dub.json not created"); +} From 4a4e9397b481f3de70f483e3fa087503b3d214bf Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sun, 13 Jul 2025 20:10:28 +0300 Subject: [PATCH 012/187] 1-dynLib-simple Signed-off-by: Andrei Horodniceanu --- test/1-dynLib-simple/.no_build_gdc | 0 test/1-dynLib-simple/.no_run | 0 test/{ => new_tests}/1-dynLib-simple/dub.json | 0 test/{ => new_tests}/1-dynLib-simple/source/dynlib/app.d | 0 test/new_tests/1-dynLib-simple/test.config | 1 + 5 files changed, 1 insertion(+) delete mode 100644 test/1-dynLib-simple/.no_build_gdc delete mode 100644 test/1-dynLib-simple/.no_run rename test/{ => new_tests}/1-dynLib-simple/dub.json (100%) rename test/{ => new_tests}/1-dynLib-simple/source/dynlib/app.d (100%) create mode 100644 test/new_tests/1-dynLib-simple/test.config diff --git a/test/1-dynLib-simple/.no_build_gdc b/test/1-dynLib-simple/.no_build_gdc deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/1-dynLib-simple/.no_run b/test/1-dynLib-simple/.no_run deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/1-dynLib-simple/dub.json b/test/new_tests/1-dynLib-simple/dub.json similarity index 100% rename from test/1-dynLib-simple/dub.json rename to test/new_tests/1-dynLib-simple/dub.json diff --git a/test/1-dynLib-simple/source/dynlib/app.d b/test/new_tests/1-dynLib-simple/source/dynlib/app.d similarity index 100% rename from test/1-dynLib-simple/source/dynlib/app.d rename to test/new_tests/1-dynLib-simple/source/dynlib/app.d diff --git a/test/new_tests/1-dynLib-simple/test.config b/test/new_tests/1-dynLib-simple/test.config new file mode 100644 index 0000000000..32efffa32d --- /dev/null +++ b/test/new_tests/1-dynLib-simple/test.config @@ -0,0 +1 @@ +dub_command = build From c52e7b0d361347c7be431f031aa0ffcbe5110f6e Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sun, 13 Jul 2025 20:11:46 +0300 Subject: [PATCH 013/187] 1-exec-simple Signed-off-by: Andrei Horodniceanu --- test/{ => new_tests}/1-exec-simple/dub.json | 0 test/{ => new_tests}/1-exec-simple/source/app.d | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename test/{ => new_tests}/1-exec-simple/dub.json (100%) rename test/{ => new_tests}/1-exec-simple/source/app.d (100%) diff --git a/test/1-exec-simple/dub.json b/test/new_tests/1-exec-simple/dub.json similarity index 100% rename from test/1-exec-simple/dub.json rename to test/new_tests/1-exec-simple/dub.json diff --git a/test/1-exec-simple/source/app.d b/test/new_tests/1-exec-simple/source/app.d similarity index 100% rename from test/1-exec-simple/source/app.d rename to test/new_tests/1-exec-simple/source/app.d From 27dc82e6d495ebb45b95a8c9ddedea70d271c8e5 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sun, 13 Jul 2025 20:14:49 +0300 Subject: [PATCH 014/187] 1-exec-simple-package-json Signed-off-by: Andrei Horodniceanu --- test/1-exec-simple-package-json/package.json | 4 ---- test/new_tests/1-exec-simple-package-json/package.json | 4 ++++ test/{ => new_tests}/1-exec-simple-package-json/source/app.d | 0 3 files changed, 4 insertions(+), 4 deletions(-) delete mode 100644 test/1-exec-simple-package-json/package.json create mode 100644 test/new_tests/1-exec-simple-package-json/package.json rename test/{ => new_tests}/1-exec-simple-package-json/source/app.d (100%) diff --git a/test/1-exec-simple-package-json/package.json b/test/1-exec-simple-package-json/package.json deleted file mode 100644 index 016c4eab5d..0000000000 --- a/test/1-exec-simple-package-json/package.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "exec-simple", - "targetType": "executable" -} diff --git a/test/new_tests/1-exec-simple-package-json/package.json b/test/new_tests/1-exec-simple-package-json/package.json new file mode 100644 index 0000000000..df62fb877a --- /dev/null +++ b/test/new_tests/1-exec-simple-package-json/package.json @@ -0,0 +1,4 @@ +{ + "name": "exec-simple-package-json", + "targetType": "executable" +} diff --git a/test/1-exec-simple-package-json/source/app.d b/test/new_tests/1-exec-simple-package-json/source/app.d similarity index 100% rename from test/1-exec-simple-package-json/source/app.d rename to test/new_tests/1-exec-simple-package-json/source/app.d From bb65fc383eae7fa9fc768e71a4b58ef2ecbceef6 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sun, 13 Jul 2025 20:24:21 +0300 Subject: [PATCH 015/187] extra/1-sourceLib-simple Signed-off-by: Andrei Horodniceanu --- test/1-sourceLib-simple/.no_build | 0 test/{ => new_tests/extra}/1-sourceLib-simple/dub.json | 0 .../extra}/1-sourceLib-simple/source/sourcelib/app.d | 0 3 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 test/1-sourceLib-simple/.no_build rename test/{ => new_tests/extra}/1-sourceLib-simple/dub.json (100%) rename test/{ => new_tests/extra}/1-sourceLib-simple/source/sourcelib/app.d (100%) diff --git a/test/1-sourceLib-simple/.no_build b/test/1-sourceLib-simple/.no_build deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/1-sourceLib-simple/dub.json b/test/new_tests/extra/1-sourceLib-simple/dub.json similarity index 100% rename from test/1-sourceLib-simple/dub.json rename to test/new_tests/extra/1-sourceLib-simple/dub.json diff --git a/test/1-sourceLib-simple/source/sourcelib/app.d b/test/new_tests/extra/1-sourceLib-simple/source/sourcelib/app.d similarity index 100% rename from test/1-sourceLib-simple/source/sourcelib/app.d rename to test/new_tests/extra/1-sourceLib-simple/source/sourcelib/app.d From cad3c6572806eb86fa47cb051e53c56931835795 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sun, 13 Jul 2025 20:26:28 +0300 Subject: [PATCH 016/187] 1-staticLib-simple Signed-off-by: Andrei Horodniceanu --- test/1-staticLib-simple/.no_run | 0 test/{ => new_tests}/1-staticLib-simple/dub.json | 0 test/{ => new_tests}/1-staticLib-simple/source/staticlib/app.d | 0 test/new_tests/1-staticLib-simple/test.config | 1 + 4 files changed, 1 insertion(+) delete mode 100644 test/1-staticLib-simple/.no_run rename test/{ => new_tests}/1-staticLib-simple/dub.json (100%) rename test/{ => new_tests}/1-staticLib-simple/source/staticlib/app.d (100%) create mode 100644 test/new_tests/1-staticLib-simple/test.config diff --git a/test/1-staticLib-simple/.no_run b/test/1-staticLib-simple/.no_run deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/1-staticLib-simple/dub.json b/test/new_tests/1-staticLib-simple/dub.json similarity index 100% rename from test/1-staticLib-simple/dub.json rename to test/new_tests/1-staticLib-simple/dub.json diff --git a/test/1-staticLib-simple/source/staticlib/app.d b/test/new_tests/1-staticLib-simple/source/staticlib/app.d similarity index 100% rename from test/1-staticLib-simple/source/staticlib/app.d rename to test/new_tests/1-staticLib-simple/source/staticlib/app.d diff --git a/test/new_tests/1-staticLib-simple/test.config b/test/new_tests/1-staticLib-simple/test.config new file mode 100644 index 0000000000..5c654c4cdf --- /dev/null +++ b/test/new_tests/1-staticLib-simple/test.config @@ -0,0 +1 @@ +dub_command = [build, test] From dcb263352979e1746847527606c0db6d31bf7ce1 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sun, 13 Jul 2025 21:01:15 +0300 Subject: [PATCH 017/187] 2-dynLib-dep Signed-off-by: Andrei Horodniceanu --- test/2-dynLib-dep/.no_build_windows | 1 - test/{ => new_tests}/2-dynLib-dep/dub.json | 0 test/{ => new_tests}/2-dynLib-dep/source/app.d | 0 test/new_tests/2-dynLib-dep/test.config | 4 ++++ 4 files changed, 4 insertions(+), 1 deletion(-) delete mode 100644 test/2-dynLib-dep/.no_build_windows rename test/{ => new_tests}/2-dynLib-dep/dub.json (100%) rename test/{ => new_tests}/2-dynLib-dep/source/app.d (100%) create mode 100644 test/new_tests/2-dynLib-dep/test.config diff --git a/test/2-dynLib-dep/.no_build_windows b/test/2-dynLib-dep/.no_build_windows deleted file mode 100644 index d55a120400..0000000000 --- a/test/2-dynLib-dep/.no_build_windows +++ /dev/null @@ -1 +0,0 @@ -# workaround for Issue 23177 diff --git a/test/2-dynLib-dep/dub.json b/test/new_tests/2-dynLib-dep/dub.json similarity index 100% rename from test/2-dynLib-dep/dub.json rename to test/new_tests/2-dynLib-dep/dub.json diff --git a/test/2-dynLib-dep/source/app.d b/test/new_tests/2-dynLib-dep/source/app.d similarity index 100% rename from test/2-dynLib-dep/source/app.d rename to test/new_tests/2-dynLib-dep/source/app.d diff --git a/test/new_tests/2-dynLib-dep/test.config b/test/new_tests/2-dynLib-dep/test.config new file mode 100644 index 0000000000..f82959d6c3 --- /dev/null +++ b/test/new_tests/2-dynLib-dep/test.config @@ -0,0 +1,4 @@ +os = [linux, osx] +# https://github.com/dlang/dmd/issues/20120 +# transfered from https://issues.dlang.org/show_bug.cgi?id=23177 +locks = [ 1-dynLib-simple ] From 9575f01dc90d918462bb6e50969f3a92e66e7e65 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sun, 13 Jul 2025 22:23:40 +0300 Subject: [PATCH 018/187] 2-dynLib-with-staticLib-dep Signed-off-by: Andrei Horodniceanu --- test/2-dynLib-with-staticLib-dep/.no_build_gdc | 0 test/2-dynLib-with-staticLib-dep/.no_run | 0 test/{ => new_tests}/2-dynLib-with-staticLib-dep/dub.json | 0 .../2-dynLib-with-staticLib-dep/source/dynlib/app.d | 0 test/new_tests/2-dynLib-with-staticLib-dep/test.config | 2 ++ 5 files changed, 2 insertions(+) delete mode 100644 test/2-dynLib-with-staticLib-dep/.no_build_gdc delete mode 100644 test/2-dynLib-with-staticLib-dep/.no_run rename test/{ => new_tests}/2-dynLib-with-staticLib-dep/dub.json (100%) rename test/{ => new_tests}/2-dynLib-with-staticLib-dep/source/dynlib/app.d (100%) create mode 100644 test/new_tests/2-dynLib-with-staticLib-dep/test.config diff --git a/test/2-dynLib-with-staticLib-dep/.no_build_gdc b/test/2-dynLib-with-staticLib-dep/.no_build_gdc deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/2-dynLib-with-staticLib-dep/.no_run b/test/2-dynLib-with-staticLib-dep/.no_run deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/2-dynLib-with-staticLib-dep/dub.json b/test/new_tests/2-dynLib-with-staticLib-dep/dub.json similarity index 100% rename from test/2-dynLib-with-staticLib-dep/dub.json rename to test/new_tests/2-dynLib-with-staticLib-dep/dub.json diff --git a/test/2-dynLib-with-staticLib-dep/source/dynlib/app.d b/test/new_tests/2-dynLib-with-staticLib-dep/source/dynlib/app.d similarity index 100% rename from test/2-dynLib-with-staticLib-dep/source/dynlib/app.d rename to test/new_tests/2-dynLib-with-staticLib-dep/source/dynlib/app.d diff --git a/test/new_tests/2-dynLib-with-staticLib-dep/test.config b/test/new_tests/2-dynLib-with-staticLib-dep/test.config new file mode 100644 index 0000000000..f068942f9e --- /dev/null +++ b/test/new_tests/2-dynLib-with-staticLib-dep/test.config @@ -0,0 +1,2 @@ +locks = [ 1-staticLib-simple ] +dub_command = build \ No newline at end of file From 4492b713b8e4594df845da88ad8a91fac5923f62 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sun, 13 Jul 2025 22:25:45 +0300 Subject: [PATCH 019/187] 2-sourceLib-dep Signed-off-by: Andrei Horodniceanu --- test/{ => new_tests}/2-sourceLib-dep/dub.json | 2 +- test/{ => new_tests}/2-sourceLib-dep/source/app.d | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename test/{ => new_tests}/2-sourceLib-dep/dub.json (62%) rename test/{ => new_tests}/2-sourceLib-dep/source/app.d (100%) diff --git a/test/2-sourceLib-dep/dub.json b/test/new_tests/2-sourceLib-dep/dub.json similarity index 62% rename from test/2-sourceLib-dep/dub.json rename to test/new_tests/2-sourceLib-dep/dub.json index 8dde9fb3ec..626ac600fa 100644 --- a/test/2-sourceLib-dep/dub.json +++ b/test/new_tests/2-sourceLib-dep/dub.json @@ -2,6 +2,6 @@ "name": "sourcelib-dep", "description": "Testing sourceLibrary dependency.", "dependencies": { - "sourcelib-simple": { "path": "../1-sourceLib-simple/" } + "sourcelib-simple": { "path": "../extra/1-sourceLib-simple/" } } } diff --git a/test/2-sourceLib-dep/source/app.d b/test/new_tests/2-sourceLib-dep/source/app.d similarity index 100% rename from test/2-sourceLib-dep/source/app.d rename to test/new_tests/2-sourceLib-dep/source/app.d From 6e369bf9ebe073cc9dde7dd2cd8973edbad1d7db Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sun, 13 Jul 2025 22:27:30 +0300 Subject: [PATCH 020/187] 2-staticLib-dep Signed-off-by: Andrei Horodniceanu --- test/{ => new_tests}/2-staticLib-dep/dub.json | 0 test/{ => new_tests}/2-staticLib-dep/source/app.d | 0 test/new_tests/2-staticLib-dep/test.config | 1 + 3 files changed, 1 insertion(+) rename test/{ => new_tests}/2-staticLib-dep/dub.json (100%) rename test/{ => new_tests}/2-staticLib-dep/source/app.d (100%) create mode 100644 test/new_tests/2-staticLib-dep/test.config diff --git a/test/2-staticLib-dep/dub.json b/test/new_tests/2-staticLib-dep/dub.json similarity index 100% rename from test/2-staticLib-dep/dub.json rename to test/new_tests/2-staticLib-dep/dub.json diff --git a/test/2-staticLib-dep/source/app.d b/test/new_tests/2-staticLib-dep/source/app.d similarity index 100% rename from test/2-staticLib-dep/source/app.d rename to test/new_tests/2-staticLib-dep/source/app.d diff --git a/test/new_tests/2-staticLib-dep/test.config b/test/new_tests/2-staticLib-dep/test.config new file mode 100644 index 0000000000..d1819fad0a --- /dev/null +++ b/test/new_tests/2-staticLib-dep/test.config @@ -0,0 +1 @@ +locks = [ 1-staticLib-simple ] \ No newline at end of file From db333c181e6322d760e686fd900cc529b6c43689 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Mon, 14 Jul 2025 19:51:01 +0300 Subject: [PATCH 021/187] 3-copyFiles Signed-off-by: Andrei Horodniceanu --- test/3-copyFiles/.no_test | 0 test/new_tests/3-copyFiles/.gitignore | 2 ++ test/{ => new_tests}/3-copyFiles/data/file_to_copy.txt | 0 test/{ => new_tests}/3-copyFiles/data/file_to_copy_mask1.txt | 0 test/{ => new_tests}/3-copyFiles/data/file_to_copy_mask2.txt | 0 .../data/res/.nocopy/file_inside_dot_prefixed_dir.txt | 0 test/{ => new_tests}/3-copyFiles/data/res/hdpi/file1.txt | 0 test/{ => new_tests}/3-copyFiles/data/res/hdpi/file2.txt | 0 test/{ => new_tests}/3-copyFiles/data/res/hdpi/file3.txt | 0 .../3-copyFiles/data/res/hdpi/nested_dir/nested_file.txt | 0 test/{ => new_tests}/3-copyFiles/data/res/i18n/resource_en.txt | 0 test/{ => new_tests}/3-copyFiles/data/res/i18n/resource_fr.txt | 0 test/{ => new_tests}/3-copyFiles/data/res/ldpi/file1.txt | 0 test/{ => new_tests}/3-copyFiles/data/res/ldpi/file2.txt | 0 test/{ => new_tests}/3-copyFiles/data/res/ldpi/file3.txt | 0 test/{ => new_tests}/3-copyFiles/data/res/mdpi/file1.txt | 0 test/{ => new_tests}/3-copyFiles/data/res/mdpi/file2.txt | 0 test/{ => new_tests}/3-copyFiles/data/res/mdpi/file3.txt | 0 test/{ => new_tests}/3-copyFiles/dub.json | 0 test/{ => new_tests}/3-copyFiles/source/app.d | 0 20 files changed, 2 insertions(+) delete mode 100644 test/3-copyFiles/.no_test create mode 100644 test/new_tests/3-copyFiles/.gitignore rename test/{ => new_tests}/3-copyFiles/data/file_to_copy.txt (100%) rename test/{ => new_tests}/3-copyFiles/data/file_to_copy_mask1.txt (100%) rename test/{ => new_tests}/3-copyFiles/data/file_to_copy_mask2.txt (100%) rename test/{ => new_tests}/3-copyFiles/data/res/.nocopy/file_inside_dot_prefixed_dir.txt (100%) rename test/{ => new_tests}/3-copyFiles/data/res/hdpi/file1.txt (100%) rename test/{ => new_tests}/3-copyFiles/data/res/hdpi/file2.txt (100%) rename test/{ => new_tests}/3-copyFiles/data/res/hdpi/file3.txt (100%) rename test/{ => new_tests}/3-copyFiles/data/res/hdpi/nested_dir/nested_file.txt (100%) rename test/{ => new_tests}/3-copyFiles/data/res/i18n/resource_en.txt (100%) rename test/{ => new_tests}/3-copyFiles/data/res/i18n/resource_fr.txt (100%) rename test/{ => new_tests}/3-copyFiles/data/res/ldpi/file1.txt (100%) rename test/{ => new_tests}/3-copyFiles/data/res/ldpi/file2.txt (100%) rename test/{ => new_tests}/3-copyFiles/data/res/ldpi/file3.txt (100%) rename test/{ => new_tests}/3-copyFiles/data/res/mdpi/file1.txt (100%) rename test/{ => new_tests}/3-copyFiles/data/res/mdpi/file2.txt (100%) rename test/{ => new_tests}/3-copyFiles/data/res/mdpi/file3.txt (100%) rename test/{ => new_tests}/3-copyFiles/dub.json (100%) rename test/{ => new_tests}/3-copyFiles/source/app.d (100%) diff --git a/test/3-copyFiles/.no_test b/test/3-copyFiles/.no_test deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/new_tests/3-copyFiles/.gitignore b/test/new_tests/3-copyFiles/.gitignore new file mode 100644 index 0000000000..c210b953f0 --- /dev/null +++ b/test/new_tests/3-copyFiles/.gitignore @@ -0,0 +1,2 @@ +!/data +!/data/** diff --git a/test/3-copyFiles/data/file_to_copy.txt b/test/new_tests/3-copyFiles/data/file_to_copy.txt similarity index 100% rename from test/3-copyFiles/data/file_to_copy.txt rename to test/new_tests/3-copyFiles/data/file_to_copy.txt diff --git a/test/3-copyFiles/data/file_to_copy_mask1.txt b/test/new_tests/3-copyFiles/data/file_to_copy_mask1.txt similarity index 100% rename from test/3-copyFiles/data/file_to_copy_mask1.txt rename to test/new_tests/3-copyFiles/data/file_to_copy_mask1.txt diff --git a/test/3-copyFiles/data/file_to_copy_mask2.txt b/test/new_tests/3-copyFiles/data/file_to_copy_mask2.txt similarity index 100% rename from test/3-copyFiles/data/file_to_copy_mask2.txt rename to test/new_tests/3-copyFiles/data/file_to_copy_mask2.txt diff --git a/test/3-copyFiles/data/res/.nocopy/file_inside_dot_prefixed_dir.txt b/test/new_tests/3-copyFiles/data/res/.nocopy/file_inside_dot_prefixed_dir.txt similarity index 100% rename from test/3-copyFiles/data/res/.nocopy/file_inside_dot_prefixed_dir.txt rename to test/new_tests/3-copyFiles/data/res/.nocopy/file_inside_dot_prefixed_dir.txt diff --git a/test/3-copyFiles/data/res/hdpi/file1.txt b/test/new_tests/3-copyFiles/data/res/hdpi/file1.txt similarity index 100% rename from test/3-copyFiles/data/res/hdpi/file1.txt rename to test/new_tests/3-copyFiles/data/res/hdpi/file1.txt diff --git a/test/3-copyFiles/data/res/hdpi/file2.txt b/test/new_tests/3-copyFiles/data/res/hdpi/file2.txt similarity index 100% rename from test/3-copyFiles/data/res/hdpi/file2.txt rename to test/new_tests/3-copyFiles/data/res/hdpi/file2.txt diff --git a/test/3-copyFiles/data/res/hdpi/file3.txt b/test/new_tests/3-copyFiles/data/res/hdpi/file3.txt similarity index 100% rename from test/3-copyFiles/data/res/hdpi/file3.txt rename to test/new_tests/3-copyFiles/data/res/hdpi/file3.txt diff --git a/test/3-copyFiles/data/res/hdpi/nested_dir/nested_file.txt b/test/new_tests/3-copyFiles/data/res/hdpi/nested_dir/nested_file.txt similarity index 100% rename from test/3-copyFiles/data/res/hdpi/nested_dir/nested_file.txt rename to test/new_tests/3-copyFiles/data/res/hdpi/nested_dir/nested_file.txt diff --git a/test/3-copyFiles/data/res/i18n/resource_en.txt b/test/new_tests/3-copyFiles/data/res/i18n/resource_en.txt similarity index 100% rename from test/3-copyFiles/data/res/i18n/resource_en.txt rename to test/new_tests/3-copyFiles/data/res/i18n/resource_en.txt diff --git a/test/3-copyFiles/data/res/i18n/resource_fr.txt b/test/new_tests/3-copyFiles/data/res/i18n/resource_fr.txt similarity index 100% rename from test/3-copyFiles/data/res/i18n/resource_fr.txt rename to test/new_tests/3-copyFiles/data/res/i18n/resource_fr.txt diff --git a/test/3-copyFiles/data/res/ldpi/file1.txt b/test/new_tests/3-copyFiles/data/res/ldpi/file1.txt similarity index 100% rename from test/3-copyFiles/data/res/ldpi/file1.txt rename to test/new_tests/3-copyFiles/data/res/ldpi/file1.txt diff --git a/test/3-copyFiles/data/res/ldpi/file2.txt b/test/new_tests/3-copyFiles/data/res/ldpi/file2.txt similarity index 100% rename from test/3-copyFiles/data/res/ldpi/file2.txt rename to test/new_tests/3-copyFiles/data/res/ldpi/file2.txt diff --git a/test/3-copyFiles/data/res/ldpi/file3.txt b/test/new_tests/3-copyFiles/data/res/ldpi/file3.txt similarity index 100% rename from test/3-copyFiles/data/res/ldpi/file3.txt rename to test/new_tests/3-copyFiles/data/res/ldpi/file3.txt diff --git a/test/3-copyFiles/data/res/mdpi/file1.txt b/test/new_tests/3-copyFiles/data/res/mdpi/file1.txt similarity index 100% rename from test/3-copyFiles/data/res/mdpi/file1.txt rename to test/new_tests/3-copyFiles/data/res/mdpi/file1.txt diff --git a/test/3-copyFiles/data/res/mdpi/file2.txt b/test/new_tests/3-copyFiles/data/res/mdpi/file2.txt similarity index 100% rename from test/3-copyFiles/data/res/mdpi/file2.txt rename to test/new_tests/3-copyFiles/data/res/mdpi/file2.txt diff --git a/test/3-copyFiles/data/res/mdpi/file3.txt b/test/new_tests/3-copyFiles/data/res/mdpi/file3.txt similarity index 100% rename from test/3-copyFiles/data/res/mdpi/file3.txt rename to test/new_tests/3-copyFiles/data/res/mdpi/file3.txt diff --git a/test/3-copyFiles/dub.json b/test/new_tests/3-copyFiles/dub.json similarity index 100% rename from test/3-copyFiles/dub.json rename to test/new_tests/3-copyFiles/dub.json diff --git a/test/3-copyFiles/source/app.d b/test/new_tests/3-copyFiles/source/app.d similarity index 100% rename from test/3-copyFiles/source/app.d rename to test/new_tests/3-copyFiles/source/app.d From 477cd6071ea43a9f7efe638e6b761618be9ce10a Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Mon, 14 Jul 2025 22:42:13 +0300 Subject: [PATCH 022/187] extra/4-describe Signed-off-by: Andrei Horodniceanu --- test/describe-dependency-1/.no_build | 1 - test/describe-dependency-2/.no_build | 1 - test/describe-dependency-3/.no_build | 1 - test/describe-project/.no_build | 1 - test/new_tests/extra/4-describe/.gitignore | 5 ++ .../dependency-1}/data/dummy-dep1.dat | 0 .../dependency-postGenerateCommands.sh | 0 .../dependency-preGenerateCommands.sh | 0 .../extra/4-describe/dependency-1}/dub.json | 8 +- .../4-describe/dependency-1}/otherdir/dummy.d | 0 .../4-describe/dependency-1}/source/dummy.d | 0 .../extra/4-describe/dependency-2}/dub.json | 0 .../some-extra-string-import-path/dummy.d | 0 .../dependency-2}/some-path/dummy.d | 0 .../dependency-3}/dep3-source/dummy.d | 0 .../dep3-string-import-path/dummy.d | 0 .../extra/4-describe/dependency-3}/dub.json | 0 .../extra/4-describe/project}/data/dummy.dat | 0 .../project}/do-postGenerateCommands.sh | 0 .../project}/do-preGenerateCommands.sh | 0 .../extra/4-describe/project}/dub.json | 6 +- .../extra/4-describe/project}/src/dummy.d | 0 .../extra/4-describe/project}/views/dummy.d | 0 .../extra/4-describe/test-utils/dub.json | 4 + .../test-utils/source/describe_test_utils.d | 87 +++++++++++++++++++ 25 files changed, 103 insertions(+), 11 deletions(-) delete mode 100644 test/describe-dependency-1/.no_build delete mode 100644 test/describe-dependency-2/.no_build delete mode 100644 test/describe-dependency-3/.no_build delete mode 100644 test/describe-project/.no_build create mode 100644 test/new_tests/extra/4-describe/.gitignore rename test/{describe-dependency-1 => new_tests/extra/4-describe/dependency-1}/data/dummy-dep1.dat (100%) rename test/{describe-dependency-1 => new_tests/extra/4-describe/dependency-1}/dependency-postGenerateCommands.sh (100%) rename test/{describe-dependency-1 => new_tests/extra/4-describe/dependency-1}/dependency-preGenerateCommands.sh (100%) rename test/{describe-dependency-1 => new_tests/extra/4-describe/dependency-1}/dub.json (65%) rename test/{describe-dependency-1 => new_tests/extra/4-describe/dependency-1}/otherdir/dummy.d (100%) rename test/{describe-dependency-1 => new_tests/extra/4-describe/dependency-1}/source/dummy.d (100%) rename test/{describe-dependency-2 => new_tests/extra/4-describe/dependency-2}/dub.json (100%) rename test/{describe-dependency-2 => new_tests/extra/4-describe/dependency-2}/some-extra-string-import-path/dummy.d (100%) rename test/{describe-dependency-2 => new_tests/extra/4-describe/dependency-2}/some-path/dummy.d (100%) rename test/{describe-dependency-3 => new_tests/extra/4-describe/dependency-3}/dep3-source/dummy.d (100%) rename test/{describe-dependency-3 => new_tests/extra/4-describe/dependency-3}/dep3-string-import-path/dummy.d (100%) rename test/{describe-dependency-3 => new_tests/extra/4-describe/dependency-3}/dub.json (100%) rename test/{describe-project => new_tests/extra/4-describe/project}/data/dummy.dat (100%) rename test/{describe-project => new_tests/extra/4-describe/project}/do-postGenerateCommands.sh (100%) rename test/{describe-project => new_tests/extra/4-describe/project}/do-preGenerateCommands.sh (100%) rename test/{describe-project => new_tests/extra/4-describe/project}/dub.json (90%) rename test/{describe-project => new_tests/extra/4-describe/project}/src/dummy.d (100%) rename test/{describe-project => new_tests/extra/4-describe/project}/views/dummy.d (100%) create mode 100644 test/new_tests/extra/4-describe/test-utils/dub.json create mode 100644 test/new_tests/extra/4-describe/test-utils/source/describe_test_utils.d diff --git a/test/describe-dependency-1/.no_build b/test/describe-dependency-1/.no_build deleted file mode 100644 index 8d1c8b69c3..0000000000 --- a/test/describe-dependency-1/.no_build +++ /dev/null @@ -1 +0,0 @@ - diff --git a/test/describe-dependency-2/.no_build b/test/describe-dependency-2/.no_build deleted file mode 100644 index 8d1c8b69c3..0000000000 --- a/test/describe-dependency-2/.no_build +++ /dev/null @@ -1 +0,0 @@ - diff --git a/test/describe-dependency-3/.no_build b/test/describe-dependency-3/.no_build deleted file mode 100644 index 8d1c8b69c3..0000000000 --- a/test/describe-dependency-3/.no_build +++ /dev/null @@ -1 +0,0 @@ - diff --git a/test/describe-project/.no_build b/test/describe-project/.no_build deleted file mode 100644 index 8d1c8b69c3..0000000000 --- a/test/describe-project/.no_build +++ /dev/null @@ -1 +0,0 @@ - diff --git a/test/new_tests/extra/4-describe/.gitignore b/test/new_tests/extra/4-describe/.gitignore new file mode 100644 index 0000000000..7f724941b1 --- /dev/null +++ b/test/new_tests/extra/4-describe/.gitignore @@ -0,0 +1,5 @@ +!*/ +!*/dub.json +metadata_cache.json +/project/dummy-dep1.dat +/project/dummy.dat diff --git a/test/describe-dependency-1/data/dummy-dep1.dat b/test/new_tests/extra/4-describe/dependency-1/data/dummy-dep1.dat similarity index 100% rename from test/describe-dependency-1/data/dummy-dep1.dat rename to test/new_tests/extra/4-describe/dependency-1/data/dummy-dep1.dat diff --git a/test/describe-dependency-1/dependency-postGenerateCommands.sh b/test/new_tests/extra/4-describe/dependency-1/dependency-postGenerateCommands.sh similarity index 100% rename from test/describe-dependency-1/dependency-postGenerateCommands.sh rename to test/new_tests/extra/4-describe/dependency-1/dependency-postGenerateCommands.sh diff --git a/test/describe-dependency-1/dependency-preGenerateCommands.sh b/test/new_tests/extra/4-describe/dependency-1/dependency-preGenerateCommands.sh similarity index 100% rename from test/describe-dependency-1/dependency-preGenerateCommands.sh rename to test/new_tests/extra/4-describe/dependency-1/dependency-preGenerateCommands.sh diff --git a/test/describe-dependency-1/dub.json b/test/new_tests/extra/4-describe/dependency-1/dub.json similarity index 65% rename from test/describe-dependency-1/dub.json rename to test/new_tests/extra/4-describe/dependency-1/dub.json index 89e12cae44..daadec3f78 100644 --- a/test/describe-dependency-1/dub.json +++ b/test/new_tests/extra/4-describe/dependency-1/dub.json @@ -14,10 +14,10 @@ "copyFiles": ["data/*"], "versions": ["anotherVerIdent"], "debugVersions": ["anotherDebugVerIdent"], - "preGenerateCommands-posix": ["../describe-dependency-1/dependency-preGenerateCommands.sh"], - "postGenerateCommands-posix": ["../describe-dependency-1/dependency-postGenerateCommands.sh"], - "preBuildCommands-posix": ["../describe-dependency-1/dependency-preBuildCommands.sh"], - "postBuildCommands-posix": ["../describe-dependency-1/dependency-postBuildCommands.sh"], + "preGenerateCommands-posix": ["../dependency-1/dependency-preGenerateCommands.sh"], + "postGenerateCommands-posix": ["../dependency-1/dependency-postGenerateCommands.sh"], + "preBuildCommands-posix": ["../dependency-1/dependency-preBuildCommands.sh"], + "postBuildCommands-posix": ["../dependency-1/dependency-postBuildCommands.sh"], "buildRequirements": ["requireContracts"], "buildOptions": ["stackStomping"], "configurations": [ diff --git a/test/describe-dependency-1/otherdir/dummy.d b/test/new_tests/extra/4-describe/dependency-1/otherdir/dummy.d similarity index 100% rename from test/describe-dependency-1/otherdir/dummy.d rename to test/new_tests/extra/4-describe/dependency-1/otherdir/dummy.d diff --git a/test/describe-dependency-1/source/dummy.d b/test/new_tests/extra/4-describe/dependency-1/source/dummy.d similarity index 100% rename from test/describe-dependency-1/source/dummy.d rename to test/new_tests/extra/4-describe/dependency-1/source/dummy.d diff --git a/test/describe-dependency-2/dub.json b/test/new_tests/extra/4-describe/dependency-2/dub.json similarity index 100% rename from test/describe-dependency-2/dub.json rename to test/new_tests/extra/4-describe/dependency-2/dub.json diff --git a/test/describe-dependency-2/some-extra-string-import-path/dummy.d b/test/new_tests/extra/4-describe/dependency-2/some-extra-string-import-path/dummy.d similarity index 100% rename from test/describe-dependency-2/some-extra-string-import-path/dummy.d rename to test/new_tests/extra/4-describe/dependency-2/some-extra-string-import-path/dummy.d diff --git a/test/describe-dependency-2/some-path/dummy.d b/test/new_tests/extra/4-describe/dependency-2/some-path/dummy.d similarity index 100% rename from test/describe-dependency-2/some-path/dummy.d rename to test/new_tests/extra/4-describe/dependency-2/some-path/dummy.d diff --git a/test/describe-dependency-3/dep3-source/dummy.d b/test/new_tests/extra/4-describe/dependency-3/dep3-source/dummy.d similarity index 100% rename from test/describe-dependency-3/dep3-source/dummy.d rename to test/new_tests/extra/4-describe/dependency-3/dep3-source/dummy.d diff --git a/test/describe-dependency-3/dep3-string-import-path/dummy.d b/test/new_tests/extra/4-describe/dependency-3/dep3-string-import-path/dummy.d similarity index 100% rename from test/describe-dependency-3/dep3-string-import-path/dummy.d rename to test/new_tests/extra/4-describe/dependency-3/dep3-string-import-path/dummy.d diff --git a/test/describe-dependency-3/dub.json b/test/new_tests/extra/4-describe/dependency-3/dub.json similarity index 100% rename from test/describe-dependency-3/dub.json rename to test/new_tests/extra/4-describe/dependency-3/dub.json diff --git a/test/describe-project/data/dummy.dat b/test/new_tests/extra/4-describe/project/data/dummy.dat similarity index 100% rename from test/describe-project/data/dummy.dat rename to test/new_tests/extra/4-describe/project/data/dummy.dat diff --git a/test/describe-project/do-postGenerateCommands.sh b/test/new_tests/extra/4-describe/project/do-postGenerateCommands.sh similarity index 100% rename from test/describe-project/do-postGenerateCommands.sh rename to test/new_tests/extra/4-describe/project/do-postGenerateCommands.sh diff --git a/test/describe-project/do-preGenerateCommands.sh b/test/new_tests/extra/4-describe/project/do-preGenerateCommands.sh similarity index 100% rename from test/describe-project/do-preGenerateCommands.sh rename to test/new_tests/extra/4-describe/project/do-preGenerateCommands.sh diff --git a/test/describe-project/dub.json b/test/new_tests/extra/4-describe/project/dub.json similarity index 90% rename from test/describe-project/dub.json rename to test/new_tests/extra/4-describe/project/dub.json index c52d085c41..a18f282819 100644 --- a/test/describe-project/dub.json +++ b/test/new_tests/extra/4-describe/project/dub.json @@ -24,15 +24,15 @@ "dependencies": { "describe-dependency-1": { "version": "1.0", - "path": "../describe-dependency-1" + "path": "../dependency-1" }, "describe-dependency-2": { "version": "1.0", - "path": "../describe-dependency-2" + "path": "../dependency-2" }, "describe-dependency-3": { "version": "1.0", - "path": "../describe-dependency-3" + "path": "../dependency-3" } }, "configurations": [ diff --git a/test/describe-project/src/dummy.d b/test/new_tests/extra/4-describe/project/src/dummy.d similarity index 100% rename from test/describe-project/src/dummy.d rename to test/new_tests/extra/4-describe/project/src/dummy.d diff --git a/test/describe-project/views/dummy.d b/test/new_tests/extra/4-describe/project/views/dummy.d similarity index 100% rename from test/describe-project/views/dummy.d rename to test/new_tests/extra/4-describe/project/views/dummy.d diff --git a/test/new_tests/extra/4-describe/test-utils/dub.json b/test/new_tests/extra/4-describe/test-utils/dub.json new file mode 100644 index 0000000000..3448f7016f --- /dev/null +++ b/test/new_tests/extra/4-describe/test-utils/dub.json @@ -0,0 +1,4 @@ +{ + "name": "describe-test-utils", + "targetType": "sourceLibrary" +} diff --git a/test/new_tests/extra/4-describe/test-utils/source/describe_test_utils.d b/test/new_tests/extra/4-describe/test-utils/source/describe_test_utils.d new file mode 100644 index 0000000000..b122af0930 --- /dev/null +++ b/test/new_tests/extra/4-describe/test-utils/source/describe_test_utils.d @@ -0,0 +1,87 @@ +module describe_test_utils; + +void printDifference(const char[][] dubOutput, const char[][] expected) +{ + import std.stdio; + import std.algorithm; + import std.range; + import std.array; + + writefln(" dub vs us"); + foreach (it, us; lockstep(dubOutput, expected)) { + if (it == us) { + writefln("✅ '%s' vs '%s'", it, us); + } else { + writefln("❌ '%s' vs '%s'", it, us); + } + } + + const(const char[])[] extra; + if (dubOutput.length < expected.length) { + writeln("Dub output was cut short:"); + extra = expected[dubOutput.length .. $]; + } else if (dubOutput.length > expected.length) { + writeln("Dub output was too much:"); + extra = dubOutput[expected.length .. $]; + } + foreach (line; extra) + writeln(line); +} +inout(char[]) escape(inout char[] input) { + version(Posix) + immutable escapeChar = '\''; + else + immutable escapeChar = '"'; + + if (doEscape) + return escapeChar ~ input ~ escapeChar; + return input; +} + +version(Posix) { + immutable bool doEscape; + shared static this() { + import std.process; + import std.uni; + import std.file; + import std.algorithm; + import std.conv; + doEscape = __VERSION__ < 2103 || getcwd().any!isSpace; + } +} else + immutable bool doEscape = true; + +string myBuildPath (string[] segments...) { + import std.path; + // On windows: + // + // std.path.buildPath("c:\foo", "bar", "") + // => "c:\foo\bar" + // + // but we want "c:\foo\bar\" + auto result = buildPath(segments); + if (segments[$ - 1] == "") + result ~= dirSeparator; + return result; +} + +string libName(string base) { + version(Posix) + return "lib" ~ base ~ ".a"; + else + return base ~ ".lib"; +} + +string libSuffix() { + version(Posix) + return ".a"; + else + return ".lib"; +} + +string fixWindowsCR(string line) { + // FIXME: dub listing output contains \r\r\n instead of \r\n on windows + while (line.length && line[$ - 1] == '\r') + line = line[0 .. $ - 1]; + return line; +} From 2c87f9bca767256fee280f27cecdc59d6194e390 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Wed, 23 Jul 2025 22:58:12 +0300 Subject: [PATCH 023/187] 4-describe-data-1-list Signed-off-by: Andrei Horodniceanu --- test/4-describe-data-1-list.sh | 170 --------------- .../new_tests/4-describe-data-1-list/dub.json | 12 ++ .../4-describe-data-1-list/source/app.d | 193 ++++++++++++++++++ .../4-describe-data-1-list/test.config | 1 + 4 files changed, 206 insertions(+), 170 deletions(-) delete mode 100755 test/4-describe-data-1-list.sh create mode 100644 test/new_tests/4-describe-data-1-list/dub.json create mode 100644 test/new_tests/4-describe-data-1-list/source/app.d create mode 100644 test/new_tests/4-describe-data-1-list/test.config diff --git a/test/4-describe-data-1-list.sh b/test/4-describe-data-1-list.sh deleted file mode 100755 index 934243e11b..0000000000 --- a/test/4-describe-data-1-list.sh +++ /dev/null @@ -1,170 +0,0 @@ -#!/usr/bin/env bash - -. $(dirname "${BASH_SOURCE[0]}")/common.sh - -cd "$CURR_DIR"/describe-project - -temp_file=$(mktemp $(basename $0).XXXXXX) - -function cleanup { - rm $temp_file -} - -trap cleanup EXIT - -if ! $DUB describe --compiler=$DC --filter-versions \ - --data-list \ - '--data= target-type , target-path , target-name ' \ - '--data= working-directory ' \ - --data=main-source-file \ - '--data=dflags,lflags' \ - '--data=libs, linker-files' \ - '--data=source-files, copy-files' \ - '--data=versions, debug-versions' \ - --data=import-paths \ - --data=string-import-paths \ - --data=import-files \ - --data=string-import-files \ - --data=pre-generate-commands \ - --data=post-generate-commands \ - --data=pre-build-commands \ - --data=post-build-commands \ - '--data=requirements, options' \ - --data=default-config \ - --data=configs \ - --data=default-build \ - --data=builds \ - > "$temp_file"; then - die $LINENO 'Printing project data failed!' -fi - -# Create the expected output path file to compare against. -expected_file="$CURR_DIR/expected-describe-data-1-list-output" -# --data=target-type -echo "executable" > "$expected_file" -echo >> "$expected_file" -# --data=target-path -echo "$CURR_DIR/describe-project/" >> "$expected_file" -echo >> "$expected_file" -# --data=target-name -echo "describe-project" >> "$expected_file" -echo >> "$expected_file" -# --data=working-directory -echo "$CURR_DIR/describe-project/" >> "$expected_file" -echo >> "$expected_file" -# --data=main-source-file -echo "$CURR_DIR/describe-project/src/dummy.d" >> "$expected_file" -echo >> "$expected_file" -# --data=dflags -echo "--some-dflag" >> "$expected_file" -echo "--another-dflag" >> "$expected_file" -echo >> "$expected_file" -# --data=lflags -echo "--some-lflag" >> "$expected_file" -echo "--another-lflag" >> "$expected_file" -echo >> "$expected_file" -# --data=libs -echo "somelib" >> "$expected_file" -echo "anotherlib" >> "$expected_file" -echo >> "$expected_file" -# --data=linker-files -echo "$CURR_DIR/describe-dependency-3/libdescribe-dependency-3.a" >> "$expected_file" -echo "$CURR_DIR/describe-project/some.a" >> "$expected_file" -echo "$CURR_DIR/describe-dependency-1/dep.a" >> "$expected_file" -echo >> "$expected_file" -# --data=source-files -echo "$CURR_DIR/describe-project/src/dummy.d" >> "$expected_file" -echo "$CURR_DIR/describe-dependency-1/source/dummy.d" >> "$expected_file" -echo >> "$expected_file" -# --data=copy-files -echo "$CURR_DIR/describe-project/data/dummy.dat" >> "$expected_file" -echo "$CURR_DIR/describe-dependency-1/data/*" >> "$expected_file" -echo >> "$expected_file" -# --data=versions -echo "someVerIdent" >> "$expected_file" -echo "anotherVerIdent" >> "$expected_file" -echo "Have_describe_dependency_3" >> "$expected_file" -echo >> "$expected_file" -# --data=debug-versions -echo "someDebugVerIdent" >> "$expected_file" -echo "anotherDebugVerIdent" >> "$expected_file" -echo >> "$expected_file" -# --data=import-paths -echo "$CURR_DIR/describe-project/src/" >> "$expected_file" -echo "$CURR_DIR/describe-dependency-1/source/" >> "$expected_file" -echo "$CURR_DIR/describe-dependency-2/some-path/" >> "$expected_file" -echo "$CURR_DIR/describe-dependency-3/dep3-source/" >> "$expected_file" -echo >> "$expected_file" -# --data=string-import-paths -echo "$CURR_DIR/describe-project/views/" >> "$expected_file" -echo "$CURR_DIR/describe-dependency-2/some-extra-string-import-path/" >> "$expected_file" -echo "$CURR_DIR/describe-dependency-3/dep3-string-import-path/" >> "$expected_file" -echo >> "$expected_file" -# --data=import-files -echo "$CURR_DIR/describe-dependency-2/some-path/dummy.d" >> "$expected_file" -echo >> "$expected_file" -# --data=string-import-files -echo "$CURR_DIR/describe-project/views/dummy.d" >> "$expected_file" -#echo "$CURR_DIR/describe-dependency-2/some-extra-string-import-path/dummy.d" >> "$expected_file" # This is missing from result, is that a bug? -echo >> "$expected_file" -# --data=pre-generate-commands -echo "./do-preGenerateCommands.sh" >> "$expected_file" -echo "../describe-dependency-1/dependency-preGenerateCommands.sh" >> "$expected_file" -echo >> "$expected_file" -# --data=post-generate-commands -echo "./do-postGenerateCommands.sh" >> "$expected_file" -echo "../describe-dependency-1/dependency-postGenerateCommands.sh" >> "$expected_file" -echo >> "$expected_file" -# --data=pre-build-commands -echo "./do-preBuildCommands.sh" >> "$expected_file" -echo "../describe-dependency-1/dependency-preBuildCommands.sh" >> "$expected_file" -echo >> "$expected_file" -# --data=post-build-commands -echo "./do-postBuildCommands.sh" >> "$expected_file" -echo "../describe-dependency-1/dependency-postBuildCommands.sh" >> "$expected_file" -echo >> "$expected_file" -# --data=requirements -echo "allowWarnings" >> "$expected_file" -echo "disallowInlining" >> "$expected_file" -echo "requireContracts" >> "$expected_file" -echo >> "$expected_file" -# --data=options -echo "debugMode" >> "$expected_file" -# releaseMode is not included, even though it's specified, because the requireContracts requirement drops it -echo "debugInfo" >> "$expected_file" -echo "stackStomping" >> "$expected_file" -echo "warnings" >> "$expected_file" -echo >> "$expected_file" -# --data=default-config -echo "my-project-config" >> "$expected_file" -echo >> "$expected_file" -# --data=configs -echo "my-project-config" >> "$expected_file" -echo >> "$expected_file" -# --data=default-build -echo "debug" >> "$expected_file" -echo >> "$expected_file" -# --data=builds -echo "debug" >> "$expected_file" -echo "plain" >> "$expected_file" -echo "release" >> "$expected_file" -echo "release-debug" >> "$expected_file" -echo "release-nobounds" >> "$expected_file" -echo "unittest" >> "$expected_file" -echo "profile" >> "$expected_file" -echo "profile-gc" >> "$expected_file" -echo "docs" >> "$expected_file" -echo "ddox" >> "$expected_file" -echo "cov" >> "$expected_file" -echo "cov-ctfe" >> "$expected_file" -echo "unittest-cov" >> "$expected_file" -echo "unittest-cov-ctfe" >> "$expected_file" -echo "syntax" >> "$expected_file" -# echo >> "$expected_file" - -if ! diff "$expected_file" "$temp_file"; then - echo "Result:" - cat "$temp_file" - die $LINENO 'The project data did not match the expected output!' -fi - diff --git a/test/new_tests/4-describe-data-1-list/dub.json b/test/new_tests/4-describe-data-1-list/dub.json new file mode 100644 index 0000000000..fa3421e584 --- /dev/null +++ b/test/new_tests/4-describe-data-1-list/dub.json @@ -0,0 +1,12 @@ +{ + "name": "describe-data-1", + "targetType": "executable", + "dependencies": { + "common": { + "path": "../common" + }, + "describe-test-utils": { + "path": "../extra/4-describe/test-utils" + } + } +} diff --git a/test/new_tests/4-describe-data-1-list/source/app.d b/test/new_tests/4-describe-data-1-list/source/app.d new file mode 100644 index 0000000000..30f6a293f5 --- /dev/null +++ b/test/new_tests/4-describe-data-1-list/source/app.d @@ -0,0 +1,193 @@ +import std.stdio; +import std.process; +import std.path; + +import common; +import describe_test_utils; + +void main() +{ + environment.remove("DFLAGS"); + + immutable cmd = [ + dub, + "describe", + "--filter-versions", + "--data-list", + "--data= target-type , target-path , target-name", + "--data= working-directory ", + "--data=main-source-file", + "--data=dflags,lflags", + "--data=libs, linker-files", + "--data=source-files, copy-files", + "--data=versions, debug-versions", + "--data=import-paths", + "--data=string-import-paths", + "--data=import-files", + "--data=string-import-files", + "--data=pre-generate-commands", + "--data=post-generate-commands", + "--data=pre-build-commands", + "--data=post-build-commands", + "--data=requirements, options", + "--data=default-config", + "--data=configs", + "--data=default-build", + "--data=builds", + ]; + + import std.file; + immutable describeDir = buildNormalizedPath(getcwd(), "../extra/4-describe"); + auto pipes = pipeProcess(cmd, Redirect.all, null, Config.none, + describeDir.buildPath("project")); + if (pipes.pid.wait() != 0) + die("Printing project data failed"); + + auto expected = [ + // --data=target-type + "executable", "", + // --data=target-path + describeDir.myBuildPath("project", ""), "", + // --data=target-name + "describe-project", "", + // --data=working-directory + describeDir.myBuildPath("project", ""), "", + // --data=main-source-file + describeDir.myBuildPath("project", "src", "dummy.d"), "", + // --data=dflags + "--some-dflag", + "--another-dflag", + "", + // --data=lflags + "--some-lflag", + "--another-lflag", + "", + // --data=libs + "somelib", + "anotherlib", + "", + // --data=linker-files + describeDir.myBuildPath("dependency-3", "describe-dependency-3".libName), + describeDir.myBuildPath("project", "some" ~ libSuffix), + describeDir.myBuildPath("dependency-1", "dep" ~ libSuffix), + "", + // --data=source-files + describeDir.myBuildPath("project", "src", "dummy.d"), + describeDir.myBuildPath("dependency-1", "source", "dummy.d"), + "", + // --data=copy-files + describeDir.myBuildPath("project", "data", "dummy.dat"), + describeDir.myBuildPath("dependency-1", "data", "*"), + "", + // --data=versions + "someVerIdent", + "anotherVerIdent", + "Have_describe_dependency_3", + "", + // --data=debug-versions + "someDebugVerIdent", + "anotherDebugVerIdent", + "", + // --data=import-paths + describeDir.myBuildPath("project", "src", ""), + describeDir.myBuildPath("dependency-1", "source", ""), + describeDir.myBuildPath("dependency-2", "some-path", ""), + describeDir.myBuildPath("dependency-3", "dep3-source", ""), + "", + // --data=string-import-paths + describeDir.myBuildPath("project", "views", ""), + describeDir.myBuildPath("dependency-2", "some-extra-string-import-path", ""), + describeDir.myBuildPath("dependency-3", "dep3-string-import-path", ""), + "", + // --data=import-files + describeDir.myBuildPath("dependency-2", "some-path", "dummy.d"), + "", + // --data=string-import-files + describeDir.myBuildPath("project", "views", "dummy.d"), + //describeDir.myBuildPath("dependency-2", "some-extra-string-import-path", "dummy.d"), // This is missing from result, is that a bug? + "", + ]; + + version(Posix) + expected ~= [ + // --data=pre-generate-commands + "./do-preGenerateCommands.sh", + "../dependency-1/dependency-preGenerateCommands.sh", + "", + // --data=post-generate-commands + "./do-postGenerateCommands.sh", + "../dependency-1/dependency-postGenerateCommands.sh", + "", + // --data=pre-build-commands + "./do-preBuildCommands.sh", + "../dependency-1/dependency-preBuildCommands.sh", + "", + // --data=post-build-commands + "./do-postBuildCommands.sh", + "../dependency-1/dependency-postBuildCommands.sh", + "", + ]; + else + expected ~= [ + // --data=pre-generate-commands + "", + "", + // --data=post-generate-commands + "", + "", + // --data=pre-build-commands + "", + "", + // --data=post-build-commands + "", + "", + ]; + + expected ~= [ + // --data=requirements + "allowWarnings", + "disallowInlining", + "requireContracts", + "", + // --data=options + "debugMode", + // releaseMode is not included, even though it's specified, because the requireContracts requirement, + "debugInfo", + "stackStomping", + "warnings", + "", + // --data=default-config + "my-project-config", + "", + // --data=configs + "my-project-config", + "", + // --data=default-build + "debug", + "", + // --data=builds + "debug", + "plain", + "release", + "release-debug", + "release-nobounds", + "unittest", + "profile", + "profile-gc", + "docs", + "ddox", + "cov", + "cov-ctfe", + "unittest-cov", + "unittest-cov-ctfe", + "syntax", + ]; + + import std.array; + import std.algorithm; + const got = pipes.stdout.byLineCopy.map!fixWindowsCR.array; + if (equal(got, expected)) return; + + printDifference(got, expected); + die("Dub describe output differs"); +} diff --git a/test/new_tests/4-describe-data-1-list/test.config b/test/new_tests/4-describe-data-1-list/test.config new file mode 100644 index 0000000000..884ffbdf6e --- /dev/null +++ b/test/new_tests/4-describe-data-1-list/test.config @@ -0,0 +1 @@ +locks = 4-describe From 96eec4f41ce31a4100c7472e8e942458a913c841 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Tue, 15 Jul 2025 07:48:21 +0300 Subject: [PATCH 024/187] 4-describe-data-2-dmd Signed-off-by: Andrei Horodniceanu --- test/4-describe-data-2-dmd.sh | 88 --------------- test/new_tests/4-describe-data-2-dmd/dub.json | 12 ++ .../4-describe-data-2-dmd/source/app.d | 106 ++++++++++++++++++ .../4-describe-data-2-dmd/test.config | 1 + 4 files changed, 119 insertions(+), 88 deletions(-) delete mode 100755 test/4-describe-data-2-dmd.sh create mode 100644 test/new_tests/4-describe-data-2-dmd/dub.json create mode 100644 test/new_tests/4-describe-data-2-dmd/source/app.d create mode 100644 test/new_tests/4-describe-data-2-dmd/test.config diff --git a/test/4-describe-data-2-dmd.sh b/test/4-describe-data-2-dmd.sh deleted file mode 100755 index 46e25f76d3..0000000000 --- a/test/4-describe-data-2-dmd.sh +++ /dev/null @@ -1,88 +0,0 @@ -#!/usr/bin/env bash - -. $(dirname "${BASH_SOURCE[0]}")/common.sh - -if [ "${DC}" != "dmd" ]; then - echo Skipping DMD-centric test on configuration that lacks DMD. - exit -fi - -cd "$CURR_DIR"/describe-project - -temp_file=$(mktemp $(basename $0).XXXXXX) - -function cleanup { - rm $temp_file -} - -trap cleanup EXIT - -if ! $DUB describe --compiler=$DC --filter-versions \ - --data=main-source-file \ - --data=dflags,lflags \ - --data=libs,linker-files \ - --data=source-files \ - --data=versions \ - --data=debug-versions \ - --data=import-paths \ - --data=string-import-paths \ - --data=import-files \ - --data=options \ - > "$temp_file"; then - die $LINENO 'Printing project data failed!' -fi - -# Create the expected output path file to compare against. -expected_file="$CURR_DIR/expected-describe-data-2-dmd-output" - -# check if escaping is required -. "$CURR_DIR/4-describe-data-check-escape" - -# --data=main-source-file -echo -n "$(escaped "$CURR_DIR/describe-project/src/dummy.d") " > "$expected_file" -# --data=dflags -echo -n "--some-dflag " >> "$expected_file" -echo -n "--another-dflag " >> "$expected_file" -# --data=lflags -echo -n "-L--some-lflag " >> "$expected_file" -echo -n "-L--another-lflag " >> "$expected_file" -# --data=libs -echo -n "-L-lsomelib " >> "$expected_file" -echo -n "-L-lanotherlib " >> "$expected_file" -# --data=linker-files -echo -n "$(escaped "$CURR_DIR/describe-dependency-3/libdescribe-dependency-3.a") " >> "$expected_file" -echo -n "$(escaped "$CURR_DIR/describe-project/some.a") " >> "$expected_file" -echo -n "$(escaped "$CURR_DIR/describe-dependency-1/dep.a") " >> "$expected_file" -# --data=source-files -echo -n "$(escaped "$CURR_DIR/describe-project/src/dummy.d") " >> "$expected_file" -echo -n "$(escaped "$CURR_DIR/describe-dependency-1/source/dummy.d") " >> "$expected_file" -# --data=versions -echo -n "-version=someVerIdent " >> "$expected_file" -echo -n "-version=anotherVerIdent " >> "$expected_file" -echo -n "-version=Have_describe_dependency_3 " >> "$expected_file" -# --data=debug-versions -echo -n "-debug=someDebugVerIdent " >> "$expected_file" -echo -n "-debug=anotherDebugVerIdent " >> "$expected_file" -# --data=import-paths -echo -n "$(escaped "-I$CURR_DIR/describe-project/src/") " >> "$expected_file" -echo -n "$(escaped "-I$CURR_DIR/describe-dependency-1/source/") " >> "$expected_file" -echo -n "$(escaped "-I$CURR_DIR/describe-dependency-2/some-path/") " >> "$expected_file" -echo -n "$(escaped "-I$CURR_DIR/describe-dependency-3/dep3-source/") " >> "$expected_file" -# --data=string-import-paths -echo -n "$(escaped "-J$CURR_DIR/describe-project/views/") " >> "$expected_file" -echo -n "$(escaped "-J$CURR_DIR/describe-dependency-2/some-extra-string-import-path/") " >> "$expected_file" -echo -n "$(escaped "-J$CURR_DIR/describe-dependency-3/dep3-string-import-path/") " >> "$expected_file" -# --data=import-files -echo -n "$(escaped "$CURR_DIR/describe-dependency-2/some-path/dummy.d") " >> "$expected_file" -# --data=options -echo -n "-debug " >> "$expected_file" -# releaseMode is not included, even though it's specified, because the requireContracts requirement drops it -echo -n "-g " >> "$expected_file" -echo -n "-gx " >> "$expected_file" -echo -n "-wi" >> "$expected_file" -echo "" >> "$expected_file" - -if ! diff "$expected_file" "$temp_file"; then - die $LINENO 'The project data did not match the expected output!' -fi - diff --git a/test/new_tests/4-describe-data-2-dmd/dub.json b/test/new_tests/4-describe-data-2-dmd/dub.json new file mode 100644 index 0000000000..1b657b903e --- /dev/null +++ b/test/new_tests/4-describe-data-2-dmd/dub.json @@ -0,0 +1,12 @@ +{ + "name": "describe-data-2", + "targetType": "executable", + "dependencies": { + "common": { + "path": "../common" + }, + "describe-test-utils": { + "path": "../extra/4-describe/test-utils" + } + } +} diff --git a/test/new_tests/4-describe-data-2-dmd/source/app.d b/test/new_tests/4-describe-data-2-dmd/source/app.d new file mode 100644 index 0000000000..16add47c96 --- /dev/null +++ b/test/new_tests/4-describe-data-2-dmd/source/app.d @@ -0,0 +1,106 @@ +import std.algorithm; +import std.array; +import std.file; +import std.path; +import std.process; +import std.range; +import std.stdio; + +import common; +import describe_test_utils; + +void main() +{ + if (!environment["DC"].baseName.canFind("dmd")) skip("need dmd like compiler"); + + environment.remove("DFLAGS"); + immutable cmd = [ + dub, + "describe", + "--filter-versions", + "--data=main-source-file", + "--data=dflags,lflags", + "--data=libs,linker-files", + "--data=source-files", + "--data=versions", + "--data=debug-versions", + "--data=import-paths", + "--data=string-import-paths", + "--data=import-files", + "--data=options", + ]; + + immutable describeDir = buildNormalizedPath(getcwd(), "../extra/4-describe"); + auto pipes = pipeProcess(cmd, Redirect.all, null, Config.none, + describeDir.buildPath("project")); + if (pipes.pid.wait() != 0) + die("Printing project data failed"); + + auto expectedArray = [ + // --data=main-source-file + describeDir.myBuildPath("project", "src", "dummy.d").escape, + // --data=dflags + "--some-dflag", + "--another-dflag", + // --data=lflags + "-L--some-lflag", + "-L--another-lflag", + ]; + + version(Posix) + expectedArray ~= [ + // --data=libs + "-L-lsomelib", + "-L-lanotherlib", + ]; + else + expectedArray ~= [ + // --data=libs + "-Lsomelib.lib", + "-Lanotherlib.lib", + ]; + + expectedArray ~= [ + // --data=linker-files + describeDir.myBuildPath("dependency-3", "describe-dependency-3".libName).escape, + describeDir.myBuildPath("project", "some" ~ libSuffix).escape, + describeDir.myBuildPath("dependency-1", "dep" ~ libSuffix).escape, + // --data=source-files + describeDir.myBuildPath("project", "src", "dummy.d").escape, + describeDir.myBuildPath("dependency-1", "source", "dummy.d").escape, + // --data=versions + "-version=someVerIdent", + "-version=anotherVerIdent", + "-version=Have_describe_dependency_3", + // --data=debug-versions + "-debug=someDebugVerIdent", + "-debug=anotherDebugVerIdent", + // --data=import-paths + escape("-I" ~ describeDir.myBuildPath("project", "src", "")), + escape("-I" ~ describeDir.myBuildPath("dependency-1", "source", "")), + escape("-I" ~ describeDir.myBuildPath("dependency-2", "some-path", "")), + escape("-I" ~ describeDir.myBuildPath("dependency-3", "dep3-source", "")), + // --data=string-import-paths + escape("-J" ~ describeDir.myBuildPath("project", "views", "")), + escape("-J" ~ describeDir.myBuildPath("dependency-2", "some-extra-string-import-path", "")), + escape("-J" ~ describeDir.myBuildPath("dependency-3", "dep3-string-import-path", "")), + // --data=import-files + escape(describeDir.myBuildPath("dependency-2", "some-path", "dummy.d")), + // --data=options + "-debug", + // releaseMode is not included, even though it's specified, because the requireContracts requirement drops it + "-g", + "-gx", + "-wi", + ]; + immutable expected = expectedArray.join(" "); + + const got = pipes.stdout.byLineCopy.map!fixWindowsCR.array; + + if (equal(got, [ expected ])) return; + + copy(got, File("dub-output.txt", "w").lockingTextWriter); + std.file.write("expected-output.txt", expected); + + die("Dub output didn't match. Check dub-output.txt and expected-output.txt for details"); +} diff --git a/test/new_tests/4-describe-data-2-dmd/test.config b/test/new_tests/4-describe-data-2-dmd/test.config new file mode 100644 index 0000000000..884ffbdf6e --- /dev/null +++ b/test/new_tests/4-describe-data-2-dmd/test.config @@ -0,0 +1 @@ +locks = 4-describe From 2d4741e97fa53bca801c65ad47e6c27d979d0293 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Tue, 15 Jul 2025 20:58:50 +0300 Subject: [PATCH 025/187] 4-describe-data-3-zero-delim Signed-off-by: Andrei Horodniceanu --- test/4-describe-data-3-zero-delim.sh | 130 ------------------ .../4-describe-data-3-zero-delim/dub.json | 12 ++ .../4-describe-data-3-zero-delim/source/app.d | 81 +++++++++++ .../4-describe-data-3-zero-delim/test.config | 2 + 4 files changed, 95 insertions(+), 130 deletions(-) delete mode 100755 test/4-describe-data-3-zero-delim.sh create mode 100644 test/new_tests/4-describe-data-3-zero-delim/dub.json create mode 100644 test/new_tests/4-describe-data-3-zero-delim/source/app.d create mode 100644 test/new_tests/4-describe-data-3-zero-delim/test.config diff --git a/test/4-describe-data-3-zero-delim.sh b/test/4-describe-data-3-zero-delim.sh deleted file mode 100755 index e36aeb36ea..0000000000 --- a/test/4-describe-data-3-zero-delim.sh +++ /dev/null @@ -1,130 +0,0 @@ -#!/usr/bin/env bash - -. $(dirname "${BASH_SOURCE[0]}")/common.sh - -cd "$CURR_DIR"/describe-project - -temp_file_normal=$(mktemp $(basename $0).XXXXXX) -temp_file_zero_delim=$(mktemp $(basename $0).XXXXXX) - -function cleanup { - rm $temp_file_normal - rm $temp_file_zero_delim -} - -trap cleanup EXIT - -# Test list-style project data -if ! $DUB describe --compiler=$DC --data-list \ - --data=target-type \ - --data=target-path \ - --data=target-name \ - --data=working-directory \ - --data=main-source-file \ - --data=dflags \ - --data=lflags \ - --data=libs \ - --data=linker-files \ - --data=source-files \ - --data=copy-files \ - --data=versions \ - --data=debug-versions \ - --data=import-paths \ - --data=string-import-paths \ - --data=import-files \ - --data=string-import-files \ - --data=pre-generate-commands \ - --data=post-generate-commands \ - --data=pre-build-commands \ - --data=post-build-commands \ - --data=requirements \ - --data=options \ - > "$temp_file_normal"; then - die $LINENO 'Printing list-style project data failed!' -fi - -if ! $DUB describe --compiler=$DC --data-0 --data-list \ - --data=target-type \ - --data=target-path \ - --data=target-name \ - --data=working-directory \ - --data=main-source-file \ - --data=dflags \ - --data=lflags \ - --data=libs \ - --data=linker-files \ - --data=source-files \ - --data=copy-files \ - --data=versions \ - --data=debug-versions \ - --data=import-paths \ - --data=string-import-paths \ - --data=import-files \ - --data=string-import-files \ - --data=pre-generate-commands \ - --data=post-generate-commands \ - --data=pre-build-commands \ - --data=post-build-commands \ - --data=requirements \ - --data=options \ - | xargs -0 printf "%s\n" > "$temp_file_zero_delim"; then - die $LINENO 'Printing null-delimited list-style project data failed!' -fi - -if ! diff -b -B "$temp_file_normal" "$temp_file_zero_delim"; then - die $LINENO 'The null-delimited list-style project data did not match the expected output!' -fi - -# Test --import-paths -if ! $DUB describe --compiler=$DC --import-paths \ - > "$temp_file_normal"; then - die $LINENO 'Printing --import-paths failed!' -fi - -if ! $DUB describe --compiler=$DC --data-0 --import-paths \ - | xargs -0 printf "%s\n" > "$temp_file_zero_delim"; then - die $LINENO 'Printing null-delimited --import-paths failed!' -fi - -if ! diff -b -B "$temp_file_normal" "$temp_file_zero_delim"; then - die $LINENO 'The null-delimited --import-paths data did not match the expected output!' -fi - -# DMD-only beyond this point -if [ "${DC}" != "dmd" ]; then - echo Skipping DMD-centric tests on configuration that lacks DMD. - exit -fi - -# Test dmd-style --data=versions -if ! $DUB describe --compiler=$DC --data=versions \ - > "$temp_file_normal"; then - die $LINENO 'Printing dmd-style --data=versions failed!' -fi - -if ! $DUB describe --compiler=$DC --data-0 --data=versions \ - | xargs -0 printf "%s " > "$temp_file_zero_delim"; then - die $LINENO 'Printing null-delimited dmd-style --data=versions failed!' -fi - -if ! diff -b -B "$temp_file_normal" "$temp_file_zero_delim"; then - die $LINENO 'The null-delimited dmd-style --data=versions did not match the expected output!' -fi - -# check if escaping is required -. "$CURR_DIR/4-describe-data-check-escape" - -# Test dmd-style --data=source-files -if ! $DUB describe --compiler=$DC --data=source-files \ - > "$temp_file_normal"; then - die $LINENO 'Printing dmd-style --data=source-files failed!' -fi - -if ! $DUB describe --compiler=$DC --data-0 --data=source-files \ - | xargs -0 printf "$(escaped "%s") " > "$temp_file_zero_delim"; then - die $LINENO 'Printing null-delimited dmd-style --data=source-files failed!' -fi - -if ! diff -b -B "$temp_file_normal" "$temp_file_zero_delim"; then - die $LINENO 'The null-delimited dmd-style --data=source-files did not match the expected output!' -fi diff --git a/test/new_tests/4-describe-data-3-zero-delim/dub.json b/test/new_tests/4-describe-data-3-zero-delim/dub.json new file mode 100644 index 0000000000..247f4c250b --- /dev/null +++ b/test/new_tests/4-describe-data-3-zero-delim/dub.json @@ -0,0 +1,12 @@ +{ + "name": "describe-data-3", + "targetType": "executable", + "dependencies": { + "common": { + "path": "../common" + }, + "describe-test-utils": { + "path": "../extra/4-describe/test-utils" + } + } +} diff --git a/test/new_tests/4-describe-data-3-zero-delim/source/app.d b/test/new_tests/4-describe-data-3-zero-delim/source/app.d new file mode 100644 index 0000000000..e9ae31ecf3 --- /dev/null +++ b/test/new_tests/4-describe-data-3-zero-delim/source/app.d @@ -0,0 +1,81 @@ +import std.algorithm; +import std.array; +import std.file; +import std.path; +import std.process; +import std.range; +import std.stdio; + +import common; +import describe_test_utils; + +void main() +{ + runTestCase([ + "--data-list", + "--data=target-type", + "--data=target-path", + "--data=target-name", + "--data=working-directory", + "--data=main-source-file", + "--data=dflags", + "--data=lflags", + "--data=libs", + "--data=linker-files", + "--data=source-files", + "--data=copy-files", + "--data=versions", + "--data=debug-versions", + "--data=import-paths", + "--data=string-import-paths", + "--data=import-files", + "--data=string-import-files", + "--data=pre-generate-commands", + "--data=post-generate-commands", + "--data=pre-build-commands", + "--data=post-build-commands", + "--data=requirements", + "--data=options", + ]); + + runTestCase([ "--import-paths" ]); + + if (!environment.get("DC").baseName.canFind("dmd")) { + log("Some tests were skipped because DC is not dmd-like"); + return; + } + + runTestCase([ "--data=versions" ], lines => [ lines.join(' ') ]); + + runTestCase([ "--data=source-files" ], lines => [ lines.map!escape.join(' ') ]); + + runTestCase([ "--data=source-files" ], lines => [ lines.map!escape.join(' ') ]); +} + +void runTestCase(string[] arguments, const(char[][]) delegate(const char[][]) mapper = a => a) { + const cmd = [dub, "describe"] ~ arguments; + + immutable describeDir = buildNormalizedPath(getcwd(), "../extra/4-describe"); + auto listStyle = pipeProcess(cmd, Redirect.all, null, Config.none, + describeDir.buildPath("project")); + if (listStyle.pid.wait() != 0) + die("Printing list-style project data failed"); + auto zeroStyle = pipeProcess(cmd ~ "--data-0", Redirect.all, null, Config.none, + describeDir.buildPath("project")); + if (zeroStyle.pid.wait() != 0) + die("Printing null-delimited list-style project data failed"); + + const listOutput = listStyle.stdout.byLineCopy.map!fixWindowsCR.array; + const preZeroOutput = zeroStyle.stdout.byLineCopy(No.keepTerminator, '\0').array; + const zeroOutput = mapper(preZeroOutput); + + if (!equal(listOutput, zeroOutput)) { + File("list-style.txt", "w").writef("%(%(%c%)\n%)", listOutput); + File("zero-style.txt", "w").writef("%(%(%c%)\n%)", zeroOutput); + + printDifference(listOutput, zeroOutput); + logError("The null-delimited list-style project data did not match the expected output!"); + logError("Check list-style.txt and zero-style.txt"); + die("Dub null-delimited data did not match expected output"); + } +} diff --git a/test/new_tests/4-describe-data-3-zero-delim/test.config b/test/new_tests/4-describe-data-3-zero-delim/test.config new file mode 100644 index 0000000000..95ddd5c12d --- /dev/null +++ b/test/new_tests/4-describe-data-3-zero-delim/test.config @@ -0,0 +1,2 @@ +locks = 4-describe + From 4137c09625ad3f70a5796c9de28664052b9515ac Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Tue, 15 Jul 2025 21:05:42 +0300 Subject: [PATCH 026/187] 4-describe-import-paths Signed-off-by: Andrei Horodniceanu --- test/4-describe-import-paths.sh | 28 ---------------- .../4-describe-import-paths/dub.json | 12 +++++++ .../4-describe-import-paths/source/app.d | 32 +++++++++++++++++++ .../4-describe-import-paths/test.config | 2 ++ 4 files changed, 46 insertions(+), 28 deletions(-) delete mode 100755 test/4-describe-import-paths.sh create mode 100644 test/new_tests/4-describe-import-paths/dub.json create mode 100644 test/new_tests/4-describe-import-paths/source/app.d create mode 100644 test/new_tests/4-describe-import-paths/test.config diff --git a/test/4-describe-import-paths.sh b/test/4-describe-import-paths.sh deleted file mode 100755 index 201a633e29..0000000000 --- a/test/4-describe-import-paths.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env bash - -. $(dirname "${BASH_SOURCE[0]}")/common.sh - -cd "$CURR_DIR"/describe-project - -temp_file=$(mktemp $(basename $0).XXXXXX) - -function cleanup { - rm $temp_file -} - -trap cleanup EXIT - -if ! $DUB describe --compiler=$DC --import-paths > "$temp_file"; then - die $LINENO 'Printing import paths failed!' -fi - -# Create the expected output path file to compare against. -echo "$CURR_DIR/describe-project/src/" > "$CURR_DIR/expected-import-path-output" -echo "$CURR_DIR/describe-dependency-1/source/" >> "$CURR_DIR/expected-import-path-output" -echo "$CURR_DIR/describe-dependency-2/some-path/" >> "$CURR_DIR/expected-import-path-output" -echo "$CURR_DIR/describe-dependency-3/dep3-source/" >> "$CURR_DIR/expected-import-path-output" - -if ! diff "$CURR_DIR"/expected-import-path-output "$temp_file"; then - die $LINENO 'The import paths did not match the expected output!' -fi - diff --git a/test/new_tests/4-describe-import-paths/dub.json b/test/new_tests/4-describe-import-paths/dub.json new file mode 100644 index 0000000000..b9bba06dc1 --- /dev/null +++ b/test/new_tests/4-describe-import-paths/dub.json @@ -0,0 +1,12 @@ +{ + "name": "describe-import-paths", + "targetType": "executable", + "dependencies": { + "common": { + "path": "../common" + }, + "describe-test-utils": { + "path": "../extra/4-describe/test-utils" + } + } +} diff --git a/test/new_tests/4-describe-import-paths/source/app.d b/test/new_tests/4-describe-import-paths/source/app.d new file mode 100644 index 0000000000..4b3529b575 --- /dev/null +++ b/test/new_tests/4-describe-import-paths/source/app.d @@ -0,0 +1,32 @@ +import std.array; +import std.algorithm; +import std.path; +import std.file; +import std.stdio; +import std.process; + +import describe_test_utils; +import common; + +void main() +{ + immutable describeDir = buildNormalizedPath(getcwd(), "../extra/4-describe"); + auto pipes = pipeProcess([dub, "describe", "--import-paths"], + Redirect.all, null, Config.none, + describeDir.buildPath("project")); + if (pipes.pid.wait() != 0) + die("Printing import paths failed"); + + immutable expected = [ + describeDir.myBuildPath("project", "src", ""), + describeDir.myBuildPath("dependency-1", "source", ""), + describeDir.myBuildPath("dependency-2", "some-path", ""), + describeDir.myBuildPath("dependency-3", "dep3-source", ""), + ]; + + const got = pipes.stdout.byLineCopy.map!fixWindowsCR.array; + if (equal(got, expected)) return; + + printDifference(got, expected); + die("The import paths did not match the expected output!"); +} diff --git a/test/new_tests/4-describe-import-paths/test.config b/test/new_tests/4-describe-import-paths/test.config new file mode 100644 index 0000000000..95ddd5c12d --- /dev/null +++ b/test/new_tests/4-describe-import-paths/test.config @@ -0,0 +1,2 @@ +locks = 4-describe + From af16a54fcbc7cc6571986baba4d0d128f27a7f2f Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Tue, 15 Jul 2025 21:14:39 +0300 Subject: [PATCH 027/187] 4-describe-json I have no clue why pipeProcess hangs while execute doesn't Signed-off-by: Andrei Horodniceanu --- test/4-describe-json.sh | 18 -------------- test/new_tests/4-describe-json/dub.json | 12 ++++++++++ test/new_tests/4-describe-json/source/app.d | 26 +++++++++++++++++++++ test/new_tests/4-describe-json/test.config | 2 ++ 4 files changed, 40 insertions(+), 18 deletions(-) delete mode 100755 test/4-describe-json.sh create mode 100644 test/new_tests/4-describe-json/dub.json create mode 100644 test/new_tests/4-describe-json/source/app.d create mode 100644 test/new_tests/4-describe-json/test.config diff --git a/test/4-describe-json.sh b/test/4-describe-json.sh deleted file mode 100755 index e22bb7154d..0000000000 --- a/test/4-describe-json.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env bash - -. $(dirname "${BASH_SOURCE[0]}")/common.sh - -cd "$CURR_DIR"/describe-project - -temp_file=$(mktemp $(basename $0).XXXXXX) - -function cleanup { - rm $temp_file -} - -trap cleanup EXIT - -if ! $DUB describe --compiler=$DC > "$temp_file"; then - die $LINENO 'Printing describe JSON failed!' -fi - diff --git a/test/new_tests/4-describe-json/dub.json b/test/new_tests/4-describe-json/dub.json new file mode 100644 index 0000000000..06d9c775d9 --- /dev/null +++ b/test/new_tests/4-describe-json/dub.json @@ -0,0 +1,12 @@ +{ + "name": "describe-json", + "targetType": "executable", + "dependencies": { + "common": { + "path": "../common" + }, + "describe-test-utils": { + "path": "../extra/4-describe/test-utils" + } + } +} diff --git a/test/new_tests/4-describe-json/source/app.d b/test/new_tests/4-describe-json/source/app.d new file mode 100644 index 0000000000..cb23e6e1df --- /dev/null +++ b/test/new_tests/4-describe-json/source/app.d @@ -0,0 +1,26 @@ +import std.algorithm; +import std.array; +import std.file; +import std.json; +import std.path; +import std.process; + +import common; + +void main() +{ + immutable describeDir = buildNormalizedPath(getcwd(), "../extra/4-describe"); + auto p = execute( + [dub, "describe"], null, Config.stderrPassThrough, ulong.max, describeDir.buildPath("project")); + + if (p.status != 0) + die("Printing describe JSON failed"); + + const got = p.output; + try { + parseJSON(got); + } catch (JSONException e) { + write("dub-output.txt", got); + die("Dub output was not in JSON format. Check dub-output.txt"); + } +} diff --git a/test/new_tests/4-describe-json/test.config b/test/new_tests/4-describe-json/test.config new file mode 100644 index 0000000000..95ddd5c12d --- /dev/null +++ b/test/new_tests/4-describe-json/test.config @@ -0,0 +1,2 @@ +locks = 4-describe + From a95566c31fc11b4f94f90e7cb3e600b107752c75 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Tue, 15 Jul 2025 21:18:34 +0300 Subject: [PATCH 028/187] 4-describe-string-import-paths Signed-off-by: Andrei Horodniceanu --- test/4-describe-string-import-paths.sh | 27 ---------------- .../4-describe-string-import-paths/dub.json | 12 +++++++ .../source/app.d | 31 +++++++++++++++++++ .../test.config | 2 ++ 4 files changed, 45 insertions(+), 27 deletions(-) delete mode 100755 test/4-describe-string-import-paths.sh create mode 100644 test/new_tests/4-describe-string-import-paths/dub.json create mode 100644 test/new_tests/4-describe-string-import-paths/source/app.d create mode 100644 test/new_tests/4-describe-string-import-paths/test.config diff --git a/test/4-describe-string-import-paths.sh b/test/4-describe-string-import-paths.sh deleted file mode 100755 index 89545d531c..0000000000 --- a/test/4-describe-string-import-paths.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env bash - -. $(dirname "${BASH_SOURCE[0]}")/common.sh - -cd "$CURR_DIR"/describe-project - -temp_file=$(mktemp $(basename $0).XXXXXX) - -function cleanup { - rm $temp_file -} - -trap cleanup EXIT - -if ! $DUB describe --compiler=$DC --string-import-paths > "$temp_file"; then - die $LINENO 'Printing string import paths failed!' -fi - -# Create the expected output path file to compare against. -echo "$CURR_DIR/describe-project/views/" > "$CURR_DIR/expected-string-import-path-output" -echo "$CURR_DIR/describe-dependency-2/some-extra-string-import-path/" >> "$CURR_DIR/expected-string-import-path-output" -echo "$CURR_DIR/describe-dependency-3/dep3-string-import-path/" >> "$CURR_DIR/expected-string-import-path-output" - -if ! diff "$CURR_DIR"/expected-string-import-path-output "$temp_file"; then - die $LINENO 'The string import paths did not match the expected output!' -fi - diff --git a/test/new_tests/4-describe-string-import-paths/dub.json b/test/new_tests/4-describe-string-import-paths/dub.json new file mode 100644 index 0000000000..5a62bfe333 --- /dev/null +++ b/test/new_tests/4-describe-string-import-paths/dub.json @@ -0,0 +1,12 @@ +{ + "name": "describe-string-import-paths", + "targetType": "executable", + "dependencies": { + "common": { + "path": "../common" + }, + "describe-test-utils": { + "path": "../extra/4-describe/test-utils" + } + } +} diff --git a/test/new_tests/4-describe-string-import-paths/source/app.d b/test/new_tests/4-describe-string-import-paths/source/app.d new file mode 100644 index 0000000000..568163bc8e --- /dev/null +++ b/test/new_tests/4-describe-string-import-paths/source/app.d @@ -0,0 +1,31 @@ +import std.array; +import std.algorithm; +import std.path; +import std.file; +import std.stdio; +import std.process; + +import describe_test_utils; +import common; + +void main() +{ + immutable describeDir = buildNormalizedPath(getcwd(), "../extra/4-describe"); + auto pipes = pipeProcess([dub, "describe", "--string-import-paths"], + Redirect.all, null, Config.none, + describeDir.buildPath("project")); + if (pipes.pid.wait() != 0) + die("Printing import paths failed"); + + immutable expected = [ + describeDir.myBuildPath("project", "views", ""), + describeDir.myBuildPath("dependency-2", "some-extra-string-import-path", ""), + describeDir.myBuildPath("dependency-3", "dep3-string-import-path", ""), + ]; + + const got = pipes.stdout.byLineCopy.map!fixWindowsCR.array; + if (equal(got, expected)) return; + + printDifference(got, expected); + die("The string import paths did not match the expected output!"); +} diff --git a/test/new_tests/4-describe-string-import-paths/test.config b/test/new_tests/4-describe-string-import-paths/test.config new file mode 100644 index 0000000000..95ddd5c12d --- /dev/null +++ b/test/new_tests/4-describe-string-import-paths/test.config @@ -0,0 +1,2 @@ +locks = 4-describe + From 574fd6526ad244ad85928f63301e0a48a1410eb5 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Tue, 15 Jul 2025 21:18:45 +0300 Subject: [PATCH 029/187] drop 4-describe-data-check-escape since it's no longer used Signed-off-by: Andrei Horodniceanu --- test/4-describe-data-check-escape | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 test/4-describe-data-check-escape diff --git a/test/4-describe-data-check-escape b/test/4-describe-data-check-escape deleted file mode 100644 index 8f3794723e..0000000000 --- a/test/4-describe-data-check-escape +++ /dev/null @@ -1,19 +0,0 @@ -dmd_ver=$($DC --version | grep -Eo "v2\.[0-9][0-9][0-9].[0-9]") -dmd_minor=$(echo $dmd_ver | grep -Eo "[0-9][0-9][0-9]") -dmd_micro=${dmd_ver: -1} - -if [[ $dmd_minor$dmd_micro < 1022 || "$CURR_DIR" =~ [[:space:]] ]]; then - echo "Expecting escaped paths" - escape=1 -else - echo "Not expecting escaped paths" - escape=0 -fi - -function escaped { - if [ $escape -eq 1 ]; then - echo -n "'$1'" - else - echo -n "$1" - fi -} From 8512c01e76ccf0453adecc0535687791af8b2ddf Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Tue, 15 Jul 2025 21:35:41 +0300 Subject: [PATCH 030/187] 5-convert Signed-off-by: Andrei Horodniceanu --- test/5-convert.sh | 31 -------------- test/5-convert/.no_build | 1 - test/new_tests/5-convert/.gitignore | 3 ++ test/new_tests/5-convert/dub.json | 9 ++++ .../5-convert/sample}/dub.sdl | 0 test/new_tests/5-convert/source/app.d | 41 +++++++++++++++++++ 6 files changed, 53 insertions(+), 32 deletions(-) delete mode 100755 test/5-convert.sh delete mode 100644 test/5-convert/.no_build create mode 100644 test/new_tests/5-convert/.gitignore create mode 100644 test/new_tests/5-convert/dub.json rename test/{5-convert => new_tests/5-convert/sample}/dub.sdl (100%) create mode 100644 test/new_tests/5-convert/source/app.d diff --git a/test/5-convert.sh b/test/5-convert.sh deleted file mode 100755 index 5cdbaa91de..0000000000 --- a/test/5-convert.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env bash - -. $(dirname "${BASH_SOURCE[0]}")/common.sh - -cd "$CURR_DIR"/5-convert - -temp_file=$(mktemp $(basename $0).XXXXXX) - -function cleanup { - rm $temp_file -} -trap cleanup EXIT - -cp dub.sdl dub.sdl.ref - -$DUB convert -f json - -if [ -f "dub.sdl" ]; then die $LINENO 'Old recipe file not removed.'; fi -if [ ! -f "dub.json" ]; then die $LINENO 'New recipe file not created.'; fi - -$DUB convert -f sdl - -if [ -f "dub.json" ]; then die $LINENO 'Old recipe file not removed.'; fi -if [ ! -f "dub.sdl" ]; then die $LINENO 'New recipe file not created.'; fi - -if ! diff "dub.sdl" "dub.sdl.ref"; then - die $LINENO 'The project data did not match the expected output!' -fi - -rm dub.sdl.ref - diff --git a/test/5-convert/.no_build b/test/5-convert/.no_build deleted file mode 100644 index 8d1c8b69c3..0000000000 --- a/test/5-convert/.no_build +++ /dev/null @@ -1 +0,0 @@ - diff --git a/test/new_tests/5-convert/.gitignore b/test/new_tests/5-convert/.gitignore new file mode 100644 index 0000000000..765ccab5f8 --- /dev/null +++ b/test/new_tests/5-convert/.gitignore @@ -0,0 +1,3 @@ +/sample/* +!/sample/ +!/sample/dub.sdl diff --git a/test/new_tests/5-convert/dub.json b/test/new_tests/5-convert/dub.json new file mode 100644 index 0000000000..0fdb39ee81 --- /dev/null +++ b/test/new_tests/5-convert/dub.json @@ -0,0 +1,9 @@ +{ + "name": "5-convert", + "targetType": "executable", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/5-convert/dub.sdl b/test/new_tests/5-convert/sample/dub.sdl similarity index 100% rename from test/5-convert/dub.sdl rename to test/new_tests/5-convert/sample/dub.sdl diff --git a/test/new_tests/5-convert/source/app.d b/test/new_tests/5-convert/source/app.d new file mode 100644 index 0000000000..5330b8f277 --- /dev/null +++ b/test/new_tests/5-convert/source/app.d @@ -0,0 +1,41 @@ +import common; + +import std.algorithm; +import std.array; +import std.file; +import std.process; +import std.stdio : File; +import std.string; + +void main() +{ + chdir("sample"); + copy("dub.sdl", "dub.sdl.ref"); + scope(exit) rename("dub.sdl.ref", "dub.sdl"); + + spawnProcess([dub, "convert", "-f", "json"]).wait; + + if (exists("dub.sdl")) + die("Old recipe file not removed"); + if (!exists("dub.json")) + die("New recipe file not created"); + + spawnProcess([dub, "convert", "-f", "sdl"]).wait; + + if (exists("dub.json")) + die("Old recipe file not removed"); + if (!exists("dub.sdl")) + die("New recipe file not created"); + + auto orig = File("dub.sdl.ref"); + auto ne = File("dub.sdl"); + + const got = orig.byLineCopy.map!chomp.array; + const expected = ne.byLineCopy.map!chomp.array; + + if (!equal(got, expected)) { + copy("dub.sdl.ref", "dub.sdl.expected"); + copy("dub.sdl", "dub.sdl.got"); + die("The project data did not match the expected output! Check dub.sdl.*"); + } +} From 571e8eb44f124d874a886ec8e2456d094f77add6 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Tue, 15 Jul 2025 21:45:08 +0300 Subject: [PATCH 031/187] 5-convert-stdout Signed-off-by: Andrei Horodniceanu --- test/5-convert-stdout.sh | 22 ------------- test/new_tests/5-convert-stdout/.gitignore | 1 + test/new_tests/5-convert-stdout/dub.json | 9 ++++++ .../5-convert-stdout/sample/dub.json | 4 +++ test/new_tests/5-convert-stdout/source/app.d | 31 +++++++++++++++++++ 5 files changed, 45 insertions(+), 22 deletions(-) delete mode 100755 test/5-convert-stdout.sh create mode 100644 test/new_tests/5-convert-stdout/.gitignore create mode 100644 test/new_tests/5-convert-stdout/dub.json create mode 100644 test/new_tests/5-convert-stdout/sample/dub.json create mode 100644 test/new_tests/5-convert-stdout/source/app.d diff --git a/test/5-convert-stdout.sh b/test/5-convert-stdout.sh deleted file mode 100755 index ae7b491d95..0000000000 --- a/test/5-convert-stdout.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash - -. $(dirname "${BASH_SOURCE[0]}")/common.sh - -cd ${CURR_DIR}/1-exec-simple - -EXPECTED="name \"exec-simple\" -targetType \"executable\"" - -RESULT=`${DUB} convert -s -f sdl` - -if [ ! -f dub.json ]; then - die $LINENO 'Package recipe got modified!' -fi - -if [ -f dub.sdl ]; then - die $LINENO 'An SDL recipe got written.' -fi - -if [ "$RESULT" != "$EXPECTED" ]; then - die $LINENO 'Unexpected SDLang output.' -fi diff --git a/test/new_tests/5-convert-stdout/.gitignore b/test/new_tests/5-convert-stdout/.gitignore new file mode 100644 index 0000000000..1eb6f3dfe4 --- /dev/null +++ b/test/new_tests/5-convert-stdout/.gitignore @@ -0,0 +1 @@ +!/sample diff --git a/test/new_tests/5-convert-stdout/dub.json b/test/new_tests/5-convert-stdout/dub.json new file mode 100644 index 0000000000..e75ea9fd42 --- /dev/null +++ b/test/new_tests/5-convert-stdout/dub.json @@ -0,0 +1,9 @@ +{ + "name": "5-convert-stdout", + "targetType": "executable", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/new_tests/5-convert-stdout/sample/dub.json b/test/new_tests/5-convert-stdout/sample/dub.json new file mode 100644 index 0000000000..9d4f510fe5 --- /dev/null +++ b/test/new_tests/5-convert-stdout/sample/dub.json @@ -0,0 +1,4 @@ +{ + "name": "sample-test", + "targetType": "executable" +} diff --git a/test/new_tests/5-convert-stdout/source/app.d b/test/new_tests/5-convert-stdout/source/app.d new file mode 100644 index 0000000000..517fabf471 --- /dev/null +++ b/test/new_tests/5-convert-stdout/source/app.d @@ -0,0 +1,31 @@ +import common; + +import std.algorithm; +import std.array; +import std.file; +import std.process; +import std.stdio : File; +import std.string; + +void main() +{ + chdir("sample"); + + auto pipes = teeProcess([dub, "convert", "-s", "-f", "sdl"], Redirect.stdout); + if (pipes.wait != 0) + die("Dub failed to run"); + + if (!exists("dub.json")) + die("Package recipe got modified!"); + if (exists("dub.sdl")) + die("An SDL recipe got written"); + + immutable expected = [ + `name "sample-test"`, + `targetType "executable"`, + ]; + const got = pipes.stdoutLines; + + if (!equal(got, expected)) + die("Unexpected SDLang output"); +} From ca758e559d98f39e22e97a95ace6389a2479a96f Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Tue, 15 Jul 2025 22:34:34 +0300 Subject: [PATCH 032/187] cache-generated-test-config Signed-off-by: Andrei Horodniceanu --- test/cache-generated-test-config.sh | 64 ---------------- test/cache-generated-test-config/.no_build | 0 test/cache-generated-test-config/.no_run | 0 test/cache-generated-test-config/.no_test | 0 .../cache-generated-test-config/.gitignore | 4 + .../cache-generated-test-config/dub.json | 9 +++ .../sample}/dub.sdl | 0 .../sample}/source/test.d | 0 .../cache-generated-test-config/source/app.d | 73 +++++++++++++++++++ 9 files changed, 86 insertions(+), 64 deletions(-) delete mode 100755 test/cache-generated-test-config.sh delete mode 100644 test/cache-generated-test-config/.no_build delete mode 100644 test/cache-generated-test-config/.no_run delete mode 100644 test/cache-generated-test-config/.no_test create mode 100644 test/new_tests/cache-generated-test-config/.gitignore create mode 100644 test/new_tests/cache-generated-test-config/dub.json rename test/{cache-generated-test-config => new_tests/cache-generated-test-config/sample}/dub.sdl (100%) rename test/{cache-generated-test-config => new_tests/cache-generated-test-config/sample}/source/test.d (100%) create mode 100644 test/new_tests/cache-generated-test-config/source/app.d diff --git a/test/cache-generated-test-config.sh b/test/cache-generated-test-config.sh deleted file mode 100755 index b3e17210a6..0000000000 --- a/test/cache-generated-test-config.sh +++ /dev/null @@ -1,64 +0,0 @@ -#!/usr/bin/env bash - -. $(dirname "${BASH_SOURCE[0]}")/common.sh -cd ${CURR_DIR}/cache-generated-test-config -rm -rf $HOME/.dub/cache/cache-generated-test-config/ -DUB_CODE_CACHE_PATH="$HOME/.dub/cache/cache-generated-test-config/~master/code/" - -## default test -${DUB} test --compiler=${DC} - -STAT="stat -c '%Y'" -[[ "$OSTYPE" == "darwin"* ]] && STAT="stat -f '%m' -t '%Y'" - -EXECUTABLE_TIME="$(${STAT} cache-generated-test-config-test-library)" -[ -z "$EXECUTABLE_TIME" ] && die $LINENO 'no EXECUTABLE_TIME was found' -MAIN_TIME="$(${STAT} "$(ls $DUB_CODE_CACHE_PATH/*/dub_test_root.d)")" -[ -z "$MAIN_TIME" ] && die $LINENO 'no MAIN_TIME was found' - -${DUB} test --compiler=${DC} -MAIN_FILES_COUNT=$(ls $DUB_CODE_CACHE_PATH/*/dub_test_root.d | wc -l) - -[ $MAIN_FILES_COUNT -ne 1 ] && die $LINENO 'DUB generated more then one main file' -[ "$EXECUTABLE_TIME" != "$(${STAT} cache-generated-test-config-test-library)" ] && die $LINENO 'The executable has been rebuilt' -[ "$MAIN_TIME" != "$(${STAT} "$(ls $DUB_CODE_CACHE_PATH/*/dub_test_root.d | head -n1)")" ] && die $LINENO 'The test main file has been rebuilt' - -## test with empty DFLAGS environment variable -DFLAGS="" ${DUB} test --compiler=${DC} - -STAT="stat -c '%Y'" -[[ "$OSTYPE" == "darwin"* ]] && STAT="stat -f '%m' -t '%Y'" - -EXECUTABLE_TIME="$(${STAT} cache-generated-test-config-test-library)" -[ -z "$EXECUTABLE_TIME" ] && die $LINENO 'no EXECUTABLE_TIME was found' -MAIN_TIME="$(${STAT} "$(ls $DUB_CODE_CACHE_PATH/*-\$DFLAGS-*/dub_test_root.d)")" -[ -z "$MAIN_TIME" ] && die $LINENO 'no MAIN_TIME was found' - -DFLAGS="" ${DUB} test --compiler=${DC} -MAIN_FILES_COUNT=$(ls $DUB_CODE_CACHE_PATH/*-\$DFLAGS-*/dub_test_root.d | wc -l) - -[ $MAIN_FILES_COUNT -ne 1 ] && die $LINENO 'DUB generated more then one main file' -[ "$EXECUTABLE_TIME" != "$(${STAT} cache-generated-test-config-test-library)" ] && die $LINENO 'The executable has been rebuilt' -[ "$MAIN_TIME" != "$(${STAT} "$(ls $DUB_CODE_CACHE_PATH/*-\$DFLAGS-*/dub_test_root.d | head -n1)")" ] && die $LINENO 'The test main file has been rebuilt' - -## test with DFLAGS environment variable -DFLAGS="-g" ${DUB} test --compiler=${DC} - -STAT="stat -c '%Y'" -[[ "$OSTYPE" == "darwin"* ]] && STAT="stat -f '%m' -t '%Y'" - -EXECUTABLE_TIME="$(${STAT} cache-generated-test-config-test-library)" -[ -z "$EXECUTABLE_TIME" ] && die $LINENO 'no EXECUTABLE_TIME was found' -MAIN_TIME="$(${STAT} "$(ls $DUB_CODE_CACHE_PATH/*-\$DFLAGS-*/dub_test_root.d)")" -[ -z "$MAIN_TIME" ] && die $LINENO 'no MAIN_TIME was found' - -DFLAGS="-g" ${DUB} test --compiler=${DC} -MAIN_FILES_COUNT=$(ls $DUB_CODE_CACHE_PATH/*-\$DFLAGS-*/dub_test_root.d | wc -l) - -[ $MAIN_FILES_COUNT -ne 1 ] && die $LINENO 'DUB generated more then one main file' -[ "$EXECUTABLE_TIME" != "$(${STAT} cache-generated-test-config-test-library)" ] && die $LINENO 'The executable has been rebuilt' -[ "$MAIN_TIME" != "$(${STAT} "$(ls $DUB_CODE_CACHE_PATH/*-\$DFLAGS-*/dub_test_root.d | head -n1)")" ] && die $LINENO 'The test main file has been rebuilt' - - - -exit 0 diff --git a/test/cache-generated-test-config/.no_build b/test/cache-generated-test-config/.no_build deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/cache-generated-test-config/.no_run b/test/cache-generated-test-config/.no_run deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/cache-generated-test-config/.no_test b/test/cache-generated-test-config/.no_test deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/new_tests/cache-generated-test-config/.gitignore b/test/new_tests/cache-generated-test-config/.gitignore new file mode 100644 index 0000000000..3f9c95ebb7 --- /dev/null +++ b/test/new_tests/cache-generated-test-config/.gitignore @@ -0,0 +1,4 @@ +/sample/* +!/sample +!/sample/dub.sdl +!/sample/source diff --git a/test/new_tests/cache-generated-test-config/dub.json b/test/new_tests/cache-generated-test-config/dub.json new file mode 100644 index 0000000000..1a6ce1eba7 --- /dev/null +++ b/test/new_tests/cache-generated-test-config/dub.json @@ -0,0 +1,9 @@ +{ + "name": "cache-generated-test-config", + "targetType": "executable", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/cache-generated-test-config/dub.sdl b/test/new_tests/cache-generated-test-config/sample/dub.sdl similarity index 100% rename from test/cache-generated-test-config/dub.sdl rename to test/new_tests/cache-generated-test-config/sample/dub.sdl diff --git a/test/cache-generated-test-config/source/test.d b/test/new_tests/cache-generated-test-config/sample/source/test.d similarity index 100% rename from test/cache-generated-test-config/source/test.d rename to test/new_tests/cache-generated-test-config/sample/source/test.d diff --git a/test/new_tests/cache-generated-test-config/source/app.d b/test/new_tests/cache-generated-test-config/source/app.d new file mode 100644 index 0000000000..f7af6b90f8 --- /dev/null +++ b/test/new_tests/cache-generated-test-config/source/app.d @@ -0,0 +1,73 @@ +import common; + +import std.algorithm; +import std.path; +import std.array; +import std.datetime.systime; +import std.file; +import std.process; +import std.stdio : File; + +void main() +{ + chdir("sample"); + if (dubCodeCachePath.exists) dubCodeCachePath.rmdirRecurse; + string[string] env; + + runTestCase(env, "*dub_test_root.d"); + + env["DFLAGS"] = ""; + runTestCase(env, "*DFLAGS*dub_test_root.d"); + + env["DFLAGS"] = "-g"; + runTestCase(env, "*DFLAGS*dub_test_root.d"); +} + +immutable string dubCodeCachePath; +shared static this() { + dubCodeCachePath = dubHome ~ "/cache/cache-generated-test-config/~master/code/"; +} +immutable executableName = "cache-generated-test-config-test-library" ~ DotExe; + +SysTime mainTime, executableTime; + +void runTestCase(const string[string] env, string pattern) { + invokeDubTest(env); + updateTimes(pattern); + + invokeDubTest(env); + checkTimesDidntChange(pattern); +} + +void invokeDubTest(const string[string] env) { + if (spawnProcess([dub, "test"], env).wait != 0) + die("Dub test failed"); +} + +void updateTimes(string pattern) { + executableTime = executableName.timeLastModified; + mainTime = getMainTime(pattern); +} + +void checkTimesDidntChange(string pattern) { + if (executableTime != executableName.timeLastModified) + die("The executable has been rebuilt"); + + if (mainTime != getMainTime(pattern)) + die("The test main file has been rebuilt"); +} + +SysTime getMainTime(string pattern) { + const files = dubCodeCachePath + .dirEntries(SpanMode.depth) + .map!(e => e.name) + .filter!(name => name.globMatch(pattern)) + .array; + + if (files.length == 0) + die("Dub did not generate a source file"); + if (files.length > 1) + die("Dub generated more than one main file"); + + return files[0].timeLastModified; +} From f734b365db5e541a6c5a3d6a8342072257a65502 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Tue, 15 Jul 2025 22:59:11 +0300 Subject: [PATCH 033/187] colored-output Signed-off-by: Andrei Horodniceanu --- test/colored-output.sh | 35 ---------------- test/new_tests/colored-output/.gitignore | 4 ++ test/new_tests/colored-output/dub.json | 9 +++++ test/new_tests/colored-output/sample/dub.sdl | 1 + .../colored-output/sample/source/lib.d | 0 test/new_tests/colored-output/source/app.d | 40 +++++++++++++++++++ test/new_tests/colored-output/test.config | 5 +++ 7 files changed, 59 insertions(+), 35 deletions(-) delete mode 100755 test/colored-output.sh create mode 100644 test/new_tests/colored-output/.gitignore create mode 100644 test/new_tests/colored-output/dub.json create mode 100644 test/new_tests/colored-output/sample/dub.sdl create mode 100644 test/new_tests/colored-output/sample/source/lib.d create mode 100644 test/new_tests/colored-output/source/app.d create mode 100644 test/new_tests/colored-output/test.config diff --git a/test/colored-output.sh b/test/colored-output.sh deleted file mode 100755 index 71380ffd95..0000000000 --- a/test/colored-output.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env bash - -. $(dirname "${BASH_SOURCE[0]}")/common.sh - -cd ${CURR_DIR}/1-exec-simple - -# Test that --color=never disables colors correctly -printf "Expecting 0: " -${DUB} build --color=never --compiler=${DC} 2>&1 | { ! \grep $'^\x1b\[' -c; } - -# Test that --color=auto detects no TTY correctly -printf "Expecting 0: " -${DUB} build --color=auto --compiler=${DC} 2>&1 | { ! \grep $'^\x1b\[' -c; } - -# Test that no --color= has same behaviour as --color=auto -printf "Expecting 0: " -${DUB} build --compiler=${DC} 2>&1 | { ! \grep $'^\x1b\[' -c; } - -# Test that --color=always enables colors in any case -printf "Expecting non-0: " -${DUB} build --color=always --compiler=${DC} 2>&1 | \grep $'^\x1b\[' -c - -# Test forwarding to dmd flag -color - -# Test that --color=always set dmd flag -color -printf "Expecting non-0: " -${DUB} build -v --color=always --compiler=${DC} -f 2>&1 | \grep '\-color' -c - -# Test that --color=never set no dmd flag -printf "Expecting 0: " -${DUB} build -v --color=never --compiler=${DC} -f 2>&1 | { ! \grep '\-color' -c; } - -# Test that --color=auto set no dmd flag -printf "Expecting 0: " -${DUB} build -v --color=auto --compiler=${DC} -f 2>&1 | { ! \grep '\-color' -c; } diff --git a/test/new_tests/colored-output/.gitignore b/test/new_tests/colored-output/.gitignore new file mode 100644 index 0000000000..3f9c95ebb7 --- /dev/null +++ b/test/new_tests/colored-output/.gitignore @@ -0,0 +1,4 @@ +/sample/* +!/sample +!/sample/dub.sdl +!/sample/source diff --git a/test/new_tests/colored-output/dub.json b/test/new_tests/colored-output/dub.json new file mode 100644 index 0000000000..f268ed62c0 --- /dev/null +++ b/test/new_tests/colored-output/dub.json @@ -0,0 +1,9 @@ +{ + "name": "test-colored-output", + "targetType": "executable", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/new_tests/colored-output/sample/dub.sdl b/test/new_tests/colored-output/sample/dub.sdl new file mode 100644 index 0000000000..79ce4de1b4 --- /dev/null +++ b/test/new_tests/colored-output/sample/dub.sdl @@ -0,0 +1 @@ +name "test-colored-output-sample" diff --git a/test/new_tests/colored-output/sample/source/lib.d b/test/new_tests/colored-output/sample/source/lib.d new file mode 100644 index 0000000000..e69de29bb2 diff --git a/test/new_tests/colored-output/source/app.d b/test/new_tests/colored-output/source/app.d new file mode 100644 index 0000000000..6a1e4a6032 --- /dev/null +++ b/test/new_tests/colored-output/source/app.d @@ -0,0 +1,40 @@ +import common; + +import std.algorithm; +import std.path; +import std.array; +import std.datetime.systime; +import std.file; +import std.process; +import std.stdio : File; + +void main() +{ + chdir("sample"); + immutable colorEscape = "\033["; + immutable colorSwitch = environment["DC"].baseName.canFind("ldc") ? + " -enable-color " : " -color "; + + runTestCase(["--color=never"], false, colorEscape); + runTestCase(["--color=auto"], false, colorEscape); + runTestCase([], false, colorEscape); + runTestCase(["--color=always"], true, colorEscape); + + runTestCase(["--force", "-v", "--color=never"], false, colorSwitch); + runTestCase(["--force", "-v", "--color=auto"], false, colorSwitch); + runTestCase(["--force", "-v", "--color=always"], true, colorSwitch); +} + +void runTestCase(string[] args, bool expectToFind, string outputMatch) { + auto p = teeProcess([dub, "build"] ~ args, Redirect.stdout | Redirect.stderrToStdout); + p.wait; + + immutable found = p.stdout.canFind(outputMatch); + if (found == expectToFind) return; + + if (found) { + die("Got color output but didn't expect it"); + } else { + die("Didn't get color output but expected it"); + } +} diff --git a/test/new_tests/colored-output/test.config b/test/new_tests/colored-output/test.config new file mode 100644 index 0000000000..413a332b7a --- /dev/null +++ b/test/new_tests/colored-output/test.config @@ -0,0 +1,5 @@ +# gdmd doesn't (yet) support --color +dc_backend = [dmd, ldc] +# windows color output is more complicated than escape sequences that +# can be grep'ed for in the output. +os = [linux, osx] \ No newline at end of file From 50ec4f21c98b685844a54c10a878f6cdd534b1f2 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Wed, 16 Jul 2025 20:56:42 +0300 Subject: [PATCH 034/187] cov-ctfe Signed-off-by: Andrei Horodniceanu --- test/cov-ctfe.sh | 5 ----- test/cov-ctfe/.no_build | 0 test/cov-ctfe/.no_run | 0 test/cov-ctfe/.no_test | 0 test/new_tests/cov-ctfe/.gitignore | 1 + test/{ => new_tests}/cov-ctfe/dub.sdl | 2 +- test/new_tests/cov-ctfe/test.config | 2 ++ test/{ => new_tests}/cov-ctfe/test.d | 0 8 files changed, 4 insertions(+), 6 deletions(-) delete mode 100755 test/cov-ctfe.sh delete mode 100644 test/cov-ctfe/.no_build delete mode 100644 test/cov-ctfe/.no_run delete mode 100644 test/cov-ctfe/.no_test create mode 100644 test/new_tests/cov-ctfe/.gitignore rename test/{ => new_tests}/cov-ctfe/dub.sdl (83%) create mode 100644 test/new_tests/cov-ctfe/test.config rename test/{ => new_tests}/cov-ctfe/test.d (100%) diff --git a/test/cov-ctfe.sh b/test/cov-ctfe.sh deleted file mode 100755 index 5b733c467f..0000000000 --- a/test/cov-ctfe.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash - -DIR=$(dirname "${BASH_SOURCE[0]}") -. "$DIR"/common.sh -"$DUB" run --root "$DIR"/cov-ctfe --build=cov-ctfe diff --git a/test/cov-ctfe/.no_build b/test/cov-ctfe/.no_build deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/cov-ctfe/.no_run b/test/cov-ctfe/.no_run deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/cov-ctfe/.no_test b/test/cov-ctfe/.no_test deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/new_tests/cov-ctfe/.gitignore b/test/new_tests/cov-ctfe/.gitignore new file mode 100644 index 0000000000..9da79f2040 --- /dev/null +++ b/test/new_tests/cov-ctfe/.gitignore @@ -0,0 +1 @@ +!/test.d \ No newline at end of file diff --git a/test/cov-ctfe/dub.sdl b/test/new_tests/cov-ctfe/dub.sdl similarity index 83% rename from test/cov-ctfe/dub.sdl rename to test/new_tests/cov-ctfe/dub.sdl index 51da6664e9..1d64346f80 100644 --- a/test/cov-ctfe/dub.sdl +++ b/test/new_tests/cov-ctfe/dub.sdl @@ -1,4 +1,4 @@ -name "test" +name "cov-ctfe" version "1.0.0" targetType "executable" dflags "-cov=100" diff --git a/test/new_tests/cov-ctfe/test.config b/test/new_tests/cov-ctfe/test.config new file mode 100644 index 0000000000..d29672e166 --- /dev/null +++ b/test/new_tests/cov-ctfe/test.config @@ -0,0 +1,2 @@ +dub_build_type = cov-ctfe +dc_backend = [dmd, ldc] diff --git a/test/cov-ctfe/test.d b/test/new_tests/cov-ctfe/test.d similarity index 100% rename from test/cov-ctfe/test.d rename to test/new_tests/cov-ctfe/test.d From 361d05e5a91ed1a12f7630c025184c1a42e21bdf Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Wed, 16 Jul 2025 20:59:31 +0300 Subject: [PATCH 035/187] custom-source-main-but487 Signed-off-by: Andrei Horodniceanu --- test/custom-source-main-bug487/.gitignore | 5 ----- test/custom-source-main-bug487/.no_run | 0 test/custom-source-main-bug487/.no_test | 0 test/new_tests/custom-source-main-bug487/.gitignore | 1 + test/{ => new_tests}/custom-source-main-bug487/dub.json | 0 test/{ => new_tests}/custom-source-main-bug487/mysrc/app.d | 0 test/new_tests/custom-source-main-bug487/test.config | 1 + 7 files changed, 2 insertions(+), 5 deletions(-) delete mode 100644 test/custom-source-main-bug487/.gitignore delete mode 100644 test/custom-source-main-bug487/.no_run delete mode 100644 test/custom-source-main-bug487/.no_test create mode 100644 test/new_tests/custom-source-main-bug487/.gitignore rename test/{ => new_tests}/custom-source-main-bug487/dub.json (100%) rename test/{ => new_tests}/custom-source-main-bug487/mysrc/app.d (100%) create mode 100644 test/new_tests/custom-source-main-bug487/test.config diff --git a/test/custom-source-main-bug487/.gitignore b/test/custom-source-main-bug487/.gitignore deleted file mode 100644 index 433d26664a..0000000000 --- a/test/custom-source-main-bug487/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -.dub -docs.json -__dummy.html -*.o -*.obj diff --git a/test/custom-source-main-bug487/.no_run b/test/custom-source-main-bug487/.no_run deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/custom-source-main-bug487/.no_test b/test/custom-source-main-bug487/.no_test deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/new_tests/custom-source-main-bug487/.gitignore b/test/new_tests/custom-source-main-bug487/.gitignore new file mode 100644 index 0000000000..7f8f1a3404 --- /dev/null +++ b/test/new_tests/custom-source-main-bug487/.gitignore @@ -0,0 +1 @@ +!/mysrc \ No newline at end of file diff --git a/test/custom-source-main-bug487/dub.json b/test/new_tests/custom-source-main-bug487/dub.json similarity index 100% rename from test/custom-source-main-bug487/dub.json rename to test/new_tests/custom-source-main-bug487/dub.json diff --git a/test/custom-source-main-bug487/mysrc/app.d b/test/new_tests/custom-source-main-bug487/mysrc/app.d similarity index 100% rename from test/custom-source-main-bug487/mysrc/app.d rename to test/new_tests/custom-source-main-bug487/mysrc/app.d diff --git a/test/new_tests/custom-source-main-bug487/test.config b/test/new_tests/custom-source-main-bug487/test.config new file mode 100644 index 0000000000..4c5009d257 --- /dev/null +++ b/test/new_tests/custom-source-main-bug487/test.config @@ -0,0 +1 @@ +dub_command = build \ No newline at end of file From dfd6e32844f5796f6517d7f4a3ee98779364d141 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Wed, 16 Jul 2025 21:16:21 +0300 Subject: [PATCH 036/187] custom-unittest Signed-off-by: Andrei Horodniceanu --- test/new_tests/custom-unittest/.gitignore | 1 + test/{ => new_tests}/custom-unittest/dub.json | 0 test/{ => new_tests}/custom-unittest/source/app.d | 0 test/{ => new_tests}/custom-unittest/source/lib.d | 0 test/new_tests/custom-unittest/test.config | 1 + test/{ => new_tests}/custom-unittest/test/main.d | 0 6 files changed, 2 insertions(+) create mode 100644 test/new_tests/custom-unittest/.gitignore rename test/{ => new_tests}/custom-unittest/dub.json (100%) rename test/{ => new_tests}/custom-unittest/source/app.d (100%) rename test/{ => new_tests}/custom-unittest/source/lib.d (100%) create mode 100644 test/new_tests/custom-unittest/test.config rename test/{ => new_tests}/custom-unittest/test/main.d (100%) diff --git a/test/new_tests/custom-unittest/.gitignore b/test/new_tests/custom-unittest/.gitignore new file mode 100644 index 0000000000..03c5ae8c49 --- /dev/null +++ b/test/new_tests/custom-unittest/.gitignore @@ -0,0 +1 @@ +!/test \ No newline at end of file diff --git a/test/custom-unittest/dub.json b/test/new_tests/custom-unittest/dub.json similarity index 100% rename from test/custom-unittest/dub.json rename to test/new_tests/custom-unittest/dub.json diff --git a/test/custom-unittest/source/app.d b/test/new_tests/custom-unittest/source/app.d similarity index 100% rename from test/custom-unittest/source/app.d rename to test/new_tests/custom-unittest/source/app.d diff --git a/test/custom-unittest/source/lib.d b/test/new_tests/custom-unittest/source/lib.d similarity index 100% rename from test/custom-unittest/source/lib.d rename to test/new_tests/custom-unittest/source/lib.d diff --git a/test/new_tests/custom-unittest/test.config b/test/new_tests/custom-unittest/test.config new file mode 100644 index 0000000000..685e6fc694 --- /dev/null +++ b/test/new_tests/custom-unittest/test.config @@ -0,0 +1 @@ +dub_command = [run, test] \ No newline at end of file diff --git a/test/custom-unittest/test/main.d b/test/new_tests/custom-unittest/test/main.d similarity index 100% rename from test/custom-unittest/test/main.d rename to test/new_tests/custom-unittest/test/main.d From 5cd8ba287ccecd2c05b70dbc75afc94125ba4535 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Wed, 16 Jul 2025 21:45:05 +0300 Subject: [PATCH 037/187] issue2012-dc-env Signed-off-by: Andrei Horodniceanu --- test/dc-env.sh | 6 ----- test/issue2012-dc-env/.no_build | 0 test/issue2012-dc-env/app.d | 18 -------------- test/new_tests/issue2012-dc-env/.gitignore | 3 +++ test/new_tests/issue2012-dc-env/dub.json | 8 ++++++ test/new_tests/issue2012-dc-env/sample/app.d | 26 ++++++++++++++++++++ test/new_tests/issue2012-dc-env/source/app.d | 11 +++++++++ 7 files changed, 48 insertions(+), 24 deletions(-) delete mode 100755 test/dc-env.sh delete mode 100644 test/issue2012-dc-env/.no_build delete mode 100644 test/issue2012-dc-env/app.d create mode 100644 test/new_tests/issue2012-dc-env/.gitignore create mode 100644 test/new_tests/issue2012-dc-env/dub.json create mode 100644 test/new_tests/issue2012-dc-env/sample/app.d create mode 100644 test/new_tests/issue2012-dc-env/source/app.d diff --git a/test/dc-env.sh b/test/dc-env.sh deleted file mode 100755 index e5ea3bc436..0000000000 --- a/test/dc-env.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env bash - -. $(dirname "${BASH_SOURCE[0]}")/common.sh -cd ${CURR_DIR}/issue2012-dc-env - -$DUB app.d ${DC} diff --git a/test/issue2012-dc-env/.no_build b/test/issue2012-dc-env/.no_build deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/issue2012-dc-env/app.d b/test/issue2012-dc-env/app.d deleted file mode 100644 index 4b1f4d1067..0000000000 --- a/test/issue2012-dc-env/app.d +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env dub -/+ dub.sdl: - name "app" -+/ - -import std.format; - -void main(string[] args) -{ - version (LDC) - immutable expected = "ldc2"; - version (DigitalMars) - immutable expected = "dmd"; - version (GNU) - immutable expected = "gdc"; - - assert(expected == args[1], format!"Expected '%s' but got '%s'"(expected, args[1])); -} diff --git a/test/new_tests/issue2012-dc-env/.gitignore b/test/new_tests/issue2012-dc-env/.gitignore new file mode 100644 index 0000000000..d4f3007567 --- /dev/null +++ b/test/new_tests/issue2012-dc-env/.gitignore @@ -0,0 +1,3 @@ +/sample/* +!/sample +!/sample/app.d \ No newline at end of file diff --git a/test/new_tests/issue2012-dc-env/dub.json b/test/new_tests/issue2012-dc-env/dub.json new file mode 100644 index 0000000000..88be28ad1d --- /dev/null +++ b/test/new_tests/issue2012-dc-env/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue2012-dc-env", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/new_tests/issue2012-dc-env/sample/app.d b/test/new_tests/issue2012-dc-env/sample/app.d new file mode 100644 index 0000000000..84b3f349a2 --- /dev/null +++ b/test/new_tests/issue2012-dc-env/sample/app.d @@ -0,0 +1,26 @@ +#!/usr/bin/env dub +/+ dub.sdl: + name "app" ++/ + +import std.stdio; +import std.format; +import std.path; +import std.regex; + +int main(string[] args) +{ + version (LDC) + immutable expected = "ldmd|ldc"; + version (DigitalMars) + immutable expected = "dmd"; + version (GNU) + immutable expected = "gdmd|gdc"; + + immutable dc = args[1]; + immutable dcBase = dc.baseName; + if (dcBase.matchFirst(expected)) return 0; + + writefln("[FAIL]: Expected '%s' but DC is '%s'", expected, dcBase); + return 1; +} diff --git a/test/new_tests/issue2012-dc-env/source/app.d b/test/new_tests/issue2012-dc-env/source/app.d new file mode 100644 index 0000000000..6e84adb377 --- /dev/null +++ b/test/new_tests/issue2012-dc-env/source/app.d @@ -0,0 +1,11 @@ +import common; + +import std.process; + +void main () { + immutable dc = environment["DC"]; + + auto p = spawnProcess([dub, "app.d", dc], null, Config.none, "sample"); + if (p.wait != 0) + die("Running the program failed"); +} From 6faf0aec8f3739dbd94556f47adf5f5e35b03350 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Wed, 16 Jul 2025 22:40:01 +0300 Subject: [PATCH 038/187] ddox Signed-off-by: Andrei Horodniceanu --- test/ddox.sh | 18 --------- test/ddox.sh.min_frontend | 1 - test/ddox/.no_build | 0 test/ddox/custom-tool/.gitignore | 6 --- test/ddox/custom/.gitignore | 6 --- test/ddox/default/.gitignore | 6 --- test/new_tests/ddox/.gitignore | 17 ++++++++ test/{ => new_tests}/ddox/custom-tool/dub.sdl | 0 .../ddox/custom-tool/public/copied | 0 .../ddox/custom-tool/source/app.d | 0 test/{ => new_tests}/ddox/custom/dub.sdl | 0 .../ddox/custom/source/ddox_project.d | 0 test/{ => new_tests}/ddox/default/dub.sdl | 0 .../ddox/default/source/ddox_project.d | 0 test/new_tests/ddox/dub.json | 8 ++++ test/new_tests/ddox/source/app.d | 39 +++++++++++++++++++ 16 files changed, 64 insertions(+), 37 deletions(-) delete mode 100755 test/ddox.sh delete mode 100644 test/ddox.sh.min_frontend delete mode 100644 test/ddox/.no_build delete mode 100644 test/ddox/custom-tool/.gitignore delete mode 100644 test/ddox/custom/.gitignore delete mode 100644 test/ddox/default/.gitignore create mode 100644 test/new_tests/ddox/.gitignore rename test/{ => new_tests}/ddox/custom-tool/dub.sdl (100%) rename test/{ => new_tests}/ddox/custom-tool/public/copied (100%) rename test/{ => new_tests}/ddox/custom-tool/source/app.d (100%) rename test/{ => new_tests}/ddox/custom/dub.sdl (100%) rename test/{ => new_tests}/ddox/custom/source/ddox_project.d (100%) rename test/{ => new_tests}/ddox/default/dub.sdl (100%) rename test/{ => new_tests}/ddox/default/source/ddox_project.d (100%) create mode 100644 test/new_tests/ddox/dub.json create mode 100644 test/new_tests/ddox/source/app.d diff --git a/test/ddox.sh b/test/ddox.sh deleted file mode 100755 index 9675ed8eec..0000000000 --- a/test/ddox.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env bash - -. $(dirname "${BASH_SOURCE[0]}")/common.sh - -# gdc 4.8.5 not working with ddox due to missing -# std.experimental.allocator.mallocator for libdparse -if [ ${DC} = gdc ]; then - exit 0 -fi - -(cd $CURR_DIR/ddox/default && $DUB build -b ddox) -grep -qF ddox_project $CURR_DIR/ddox/default/docs/index.html - -$DUB add-local $CURR_DIR/ddox/custom-tool -(cd $CURR_DIR/ddox/custom && $DUB build -b ddox) -grep -qF custom-tool $CURR_DIR/ddox/custom/docs/custom_tool_output -diff $CURR_DIR/ddox/custom-tool/public/copied $CURR_DIR/ddox/custom/docs/copied -$DUB remove-local $CURR_DIR/ddox/custom-tool diff --git a/test/ddox.sh.min_frontend b/test/ddox.sh.min_frontend deleted file mode 100644 index 0443faedaa..0000000000 --- a/test/ddox.sh.min_frontend +++ /dev/null @@ -1 +0,0 @@ -2.072 diff --git a/test/ddox/.no_build b/test/ddox/.no_build deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/ddox/custom-tool/.gitignore b/test/ddox/custom-tool/.gitignore deleted file mode 100644 index 3dc7018631..0000000000 --- a/test/ddox/custom-tool/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -.dub -docs.json -__dummy.html -*.o -*.obj -custom-tool diff --git a/test/ddox/custom/.gitignore b/test/ddox/custom/.gitignore deleted file mode 100644 index 7bd19a763a..0000000000 --- a/test/ddox/custom/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -.dub -docs -docs.json -__dummy.html -*.o -*.obj diff --git a/test/ddox/default/.gitignore b/test/ddox/default/.gitignore deleted file mode 100644 index 7bd19a763a..0000000000 --- a/test/ddox/default/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -.dub -docs -docs.json -__dummy.html -*.o -*.obj diff --git a/test/new_tests/ddox/.gitignore b/test/new_tests/ddox/.gitignore new file mode 100644 index 0000000000..674200f4f9 --- /dev/null +++ b/test/new_tests/ddox/.gitignore @@ -0,0 +1,17 @@ +/** + +!/.gitignore +!/source/ +!/source/*.d +!/dub.json + +!/custom +!/custom-tool +!/default + +!/*/dub.sdl +!/*/source +!/*/source/*.d + +!/custom-tool/public/ +!/custom-tool/public/copied diff --git a/test/ddox/custom-tool/dub.sdl b/test/new_tests/ddox/custom-tool/dub.sdl similarity index 100% rename from test/ddox/custom-tool/dub.sdl rename to test/new_tests/ddox/custom-tool/dub.sdl diff --git a/test/ddox/custom-tool/public/copied b/test/new_tests/ddox/custom-tool/public/copied similarity index 100% rename from test/ddox/custom-tool/public/copied rename to test/new_tests/ddox/custom-tool/public/copied diff --git a/test/ddox/custom-tool/source/app.d b/test/new_tests/ddox/custom-tool/source/app.d similarity index 100% rename from test/ddox/custom-tool/source/app.d rename to test/new_tests/ddox/custom-tool/source/app.d diff --git a/test/ddox/custom/dub.sdl b/test/new_tests/ddox/custom/dub.sdl similarity index 100% rename from test/ddox/custom/dub.sdl rename to test/new_tests/ddox/custom/dub.sdl diff --git a/test/ddox/custom/source/ddox_project.d b/test/new_tests/ddox/custom/source/ddox_project.d similarity index 100% rename from test/ddox/custom/source/ddox_project.d rename to test/new_tests/ddox/custom/source/ddox_project.d diff --git a/test/ddox/default/dub.sdl b/test/new_tests/ddox/default/dub.sdl similarity index 100% rename from test/ddox/default/dub.sdl rename to test/new_tests/ddox/default/dub.sdl diff --git a/test/ddox/default/source/ddox_project.d b/test/new_tests/ddox/default/source/ddox_project.d similarity index 100% rename from test/ddox/default/source/ddox_project.d rename to test/new_tests/ddox/default/source/ddox_project.d diff --git a/test/new_tests/ddox/dub.json b/test/new_tests/ddox/dub.json new file mode 100644 index 0000000000..dce829ac39 --- /dev/null +++ b/test/new_tests/ddox/dub.json @@ -0,0 +1,8 @@ +{ + "name": "test-ddox", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/new_tests/ddox/source/app.d b/test/new_tests/ddox/source/app.d new file mode 100644 index 0000000000..1dac8cdc1e --- /dev/null +++ b/test/new_tests/ddox/source/app.d @@ -0,0 +1,39 @@ +import common; + +import std.algorithm; +import std.process; +import std.file; +import std.path; + +void main () { + auto p = spawnProcess([dub, "build", "--build=ddox"], null, Config.none, "default"); + if (p.wait != 0) + die("Dub default ddox build failed"); + + assertContains("default/docs/index.html", "ddox_project"); + + p = spawnProcess([dub, "add-local", "custom-tool"]); + if (p.wait != 0) + die("Dub add-local failed"); + + p = spawnProcess([dub, "build", "--build=ddox"], null, Config.none, "custom"); + if (p.wait != 0) + die("Dub build ddox failed with custom tool"); + + assertContains("custom/docs/custom_tool_output", "custom-tool"); + + { + immutable expected = readText("custom-tool/public/copied"); + immutable got = readText("custom/docs/copied"); + if (expected != got) + die("The 2 'copied' files dont' match"); + } +} + +void assertContains(string path, string content) { + if (!exists(path)) + die("ddox run did not create: ", path); + + if (!readText(path).canFind(content)) + die(path, " does not contain '", content, "'"); +} From 0bdb2b3fcc2dde75f0ff77ea91fd291bc36fdb70 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Thu, 17 Jul 2025 18:39:15 +0300 Subject: [PATCH 039/187] depen-build-settings Signed-off-by: Andrei Horodniceanu --- test/depen-build-settings/.gitignore | 4 ---- test/depen-build-settings/.no_build_dmd | 0 test/depen-build-settings/.no_build_gdc | 0 test/depen-build-settings/.no_test | 0 test/new_tests/depen-build-settings/.gitignore | 9 +++++++++ .../depen-build-settings/depend/depend2/dub.json | 0 .../depen-build-settings/depend/depend2/source/depend2.d | 0 .../{ => new_tests}/depen-build-settings/depend/dub.json | 0 .../depen-build-settings/depend/source/depend.d | 0 test/{ => new_tests}/depen-build-settings/dub.json | 0 .../depen-build-settings/dub.selections.json | 0 test/{ => new_tests}/depen-build-settings/source/app.d | 0 test/new_tests/depen-build-settings/test.config | 1 + 13 files changed, 10 insertions(+), 4 deletions(-) delete mode 100644 test/depen-build-settings/.gitignore delete mode 100644 test/depen-build-settings/.no_build_dmd delete mode 100644 test/depen-build-settings/.no_build_gdc delete mode 100644 test/depen-build-settings/.no_test create mode 100644 test/new_tests/depen-build-settings/.gitignore rename test/{ => new_tests}/depen-build-settings/depend/depend2/dub.json (100%) rename test/{ => new_tests}/depen-build-settings/depend/depend2/source/depend2.d (100%) rename test/{ => new_tests}/depen-build-settings/depend/dub.json (100%) rename test/{ => new_tests}/depen-build-settings/depend/source/depend.d (100%) rename test/{ => new_tests}/depen-build-settings/dub.json (100%) rename test/{ => new_tests}/depen-build-settings/dub.selections.json (100%) rename test/{ => new_tests}/depen-build-settings/source/app.d (100%) create mode 100644 test/new_tests/depen-build-settings/test.config diff --git a/test/depen-build-settings/.gitignore b/test/depen-build-settings/.gitignore deleted file mode 100644 index 3dfd42f421..0000000000 --- a/test/depen-build-settings/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -depend.json -depend2.json -depen-build-settings.json -depen-build-settings diff --git a/test/depen-build-settings/.no_build_dmd b/test/depen-build-settings/.no_build_dmd deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/depen-build-settings/.no_build_gdc b/test/depen-build-settings/.no_build_gdc deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/depen-build-settings/.no_test b/test/depen-build-settings/.no_test deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/new_tests/depen-build-settings/.gitignore b/test/new_tests/depen-build-settings/.gitignore new file mode 100644 index 0000000000..75d6e216d0 --- /dev/null +++ b/test/new_tests/depen-build-settings/.gitignore @@ -0,0 +1,9 @@ +!/depend +!/depend/dub.json +!/depend/source/* + +!/depend/depend2/ +!/depend/depend2/dub.json +!/depend/depend2/source/* + +!/dub.selections.json diff --git a/test/depen-build-settings/depend/depend2/dub.json b/test/new_tests/depen-build-settings/depend/depend2/dub.json similarity index 100% rename from test/depen-build-settings/depend/depend2/dub.json rename to test/new_tests/depen-build-settings/depend/depend2/dub.json diff --git a/test/depen-build-settings/depend/depend2/source/depend2.d b/test/new_tests/depen-build-settings/depend/depend2/source/depend2.d similarity index 100% rename from test/depen-build-settings/depend/depend2/source/depend2.d rename to test/new_tests/depen-build-settings/depend/depend2/source/depend2.d diff --git a/test/depen-build-settings/depend/dub.json b/test/new_tests/depen-build-settings/depend/dub.json similarity index 100% rename from test/depen-build-settings/depend/dub.json rename to test/new_tests/depen-build-settings/depend/dub.json diff --git a/test/depen-build-settings/depend/source/depend.d b/test/new_tests/depen-build-settings/depend/source/depend.d similarity index 100% rename from test/depen-build-settings/depend/source/depend.d rename to test/new_tests/depen-build-settings/depend/source/depend.d diff --git a/test/depen-build-settings/dub.json b/test/new_tests/depen-build-settings/dub.json similarity index 100% rename from test/depen-build-settings/dub.json rename to test/new_tests/depen-build-settings/dub.json diff --git a/test/depen-build-settings/dub.selections.json b/test/new_tests/depen-build-settings/dub.selections.json similarity index 100% rename from test/depen-build-settings/dub.selections.json rename to test/new_tests/depen-build-settings/dub.selections.json diff --git a/test/depen-build-settings/source/app.d b/test/new_tests/depen-build-settings/source/app.d similarity index 100% rename from test/depen-build-settings/source/app.d rename to test/new_tests/depen-build-settings/source/app.d diff --git a/test/new_tests/depen-build-settings/test.config b/test/new_tests/depen-build-settings/test.config new file mode 100644 index 0000000000..a0eae07d09 --- /dev/null +++ b/test/new_tests/depen-build-settings/test.config @@ -0,0 +1 @@ +dc_backend = [ldc] From 85f5f194eff72e233a7bf75faf19a89c0e98da17 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Thu, 17 Jul 2025 18:51:08 +0300 Subject: [PATCH 040/187] dest-directory Signed-off-by: Andrei Horodniceanu --- test/dest-directory.sh | 11 -------- test/dest-directory/.no_build | 0 test/dest-directory/.no_run | 0 test/new_tests/dest-directory/.gitignore | 4 +++ test/new_tests/dest-directory/dub.json | 9 +++++++ .../dest-directory/sample}/dub.sdl | 0 .../dest-directory/sample}/source/app.d | 0 test/new_tests/dest-directory/source/app.d | 26 +++++++++++++++++++ 8 files changed, 39 insertions(+), 11 deletions(-) delete mode 100755 test/dest-directory.sh delete mode 100644 test/dest-directory/.no_build delete mode 100644 test/dest-directory/.no_run create mode 100644 test/new_tests/dest-directory/.gitignore create mode 100644 test/new_tests/dest-directory/dub.json rename test/{dest-directory => new_tests/dest-directory/sample}/dub.sdl (100%) rename test/{dest-directory => new_tests/dest-directory/sample}/source/app.d (100%) create mode 100644 test/new_tests/dest-directory/source/app.d diff --git a/test/dest-directory.sh b/test/dest-directory.sh deleted file mode 100755 index 6bc872f89f..0000000000 --- a/test/dest-directory.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bash -. $(dirname "${BASH_SOURCE[0]}")/common.sh - -cd ${CURR_DIR}/dest-directory -rm -rf .dub -rm -rf testout/ - -${DUB} build --dest=testout/ -if ! [ -d testout/ ]; then - die $LINENO 'Failed to stage into testout/' -fi \ No newline at end of file diff --git a/test/dest-directory/.no_build b/test/dest-directory/.no_build deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/dest-directory/.no_run b/test/dest-directory/.no_run deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/new_tests/dest-directory/.gitignore b/test/new_tests/dest-directory/.gitignore new file mode 100644 index 0000000000..30156a6aae --- /dev/null +++ b/test/new_tests/dest-directory/.gitignore @@ -0,0 +1,4 @@ +/sample/* +!/sample +!/sample/dub.sdl +!/sample/source \ No newline at end of file diff --git a/test/new_tests/dest-directory/dub.json b/test/new_tests/dest-directory/dub.json new file mode 100644 index 0000000000..c8b38874d4 --- /dev/null +++ b/test/new_tests/dest-directory/dub.json @@ -0,0 +1,9 @@ +{ + "name": "test-dest-directory", + "targetType": "executable", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/dest-directory/dub.sdl b/test/new_tests/dest-directory/sample/dub.sdl similarity index 100% rename from test/dest-directory/dub.sdl rename to test/new_tests/dest-directory/sample/dub.sdl diff --git a/test/dest-directory/source/app.d b/test/new_tests/dest-directory/sample/source/app.d similarity index 100% rename from test/dest-directory/source/app.d rename to test/new_tests/dest-directory/sample/source/app.d diff --git a/test/new_tests/dest-directory/source/app.d b/test/new_tests/dest-directory/source/app.d new file mode 100644 index 0000000000..fc2f241bc1 --- /dev/null +++ b/test/new_tests/dest-directory/source/app.d @@ -0,0 +1,26 @@ +import common; + +import std.file; +import std.path; +import std.process; + +void rmrf(string path) { + if (exists(path)) rmdirRecurse(path); +} + +void main () { + chdir("sample"); + + rmrf(".dub"); + rmrf("testout"); + + auto p = spawnProcess([dub, "build", "--dest=testout"]); + if (p.wait != 0) + die("Dub build failed"); + + immutable expected = "testout"; + if (!exists(expected)) + die("Dub didn't create the directory ", expected); + if (!isDir(expected)) + die("Dub created ", expected, " but it isn't a directory"); +} From c87efd38c5641fbc0928a235e76cb734774c010a Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Thu, 17 Jul 2025 19:05:57 +0300 Subject: [PATCH 041/187] dpath-variable Signed-off-by: Andrei Horodniceanu --- test/dpath-variable.sh | 29 ----------------- test/dpath-variable/.gitignore | 1 - test/new_tests/dpath-variable/.gitignore | 4 +++ test/new_tests/dpath-variable/dub.json | 9 ++++++ .../dpath-variable/sample}/dub.json | 0 .../dpath-variable/sample}/source/app.d | 0 test/new_tests/dpath-variable/source/app.d | 32 +++++++++++++++++++ 7 files changed, 45 insertions(+), 30 deletions(-) delete mode 100755 test/dpath-variable.sh delete mode 100644 test/dpath-variable/.gitignore create mode 100644 test/new_tests/dpath-variable/.gitignore create mode 100644 test/new_tests/dpath-variable/dub.json rename test/{dpath-variable => new_tests/dpath-variable/sample}/dub.json (100%) rename test/{dpath-variable => new_tests/dpath-variable/sample}/source/app.d (100%) create mode 100644 test/new_tests/dpath-variable/source/app.d diff --git a/test/dpath-variable.sh b/test/dpath-variable.sh deleted file mode 100755 index db4ac1dc6c..0000000000 --- a/test/dpath-variable.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env bash - -. $(dirname "${BASH_SOURCE[0]}")/common.sh -export DPATH="${CURR_DIR}/dpath-variable/dpath" -rm -rf "$DPATH" -cd "${CURR_DIR}/dpath-variable" -"${DUB}" upgrade - -if [[ ! -f "$DPATH/dub/packages/gitcompatibledubpackage/1.0.1/gitcompatibledubpackage/dub.json" ]]; then - die $LINENO 'Did not get dependencies installed into $DPATH.' -fi - -# just for making this shell script easier to write, copy the variable -DPATH_ALIAS="$DPATH" -# unset the variable so DUB doesn't pick it up though -unset DPATH -rm -rf "$DPATH_ALIAS" -echo '{"dubHome":"'"$DPATH_ALIAS"/dub2'"}' > "${CURR_DIR}/dpath-variable/dub.settings.json" - -function cleanup { - rm "${CURR_DIR}/dpath-variable/dub.settings.json" -} -trap cleanup EXIT - -"${DUB}" upgrade - -if [[ ! -f "$DPATH_ALIAS/dub2/packages/gitcompatibledubpackage/1.0.1/gitcompatibledubpackage/dub.json" ]]; then - die $LINENO 'Did not get dependencies installed into dubHome (set from config).' -fi diff --git a/test/dpath-variable/.gitignore b/test/dpath-variable/.gitignore deleted file mode 100644 index 9cfa21edc5..0000000000 --- a/test/dpath-variable/.gitignore +++ /dev/null @@ -1 +0,0 @@ -dpath diff --git a/test/new_tests/dpath-variable/.gitignore b/test/new_tests/dpath-variable/.gitignore new file mode 100644 index 0000000000..bff974fe5a --- /dev/null +++ b/test/new_tests/dpath-variable/.gitignore @@ -0,0 +1,4 @@ +/sample/* +!/sample/ +!/sample/dub.json/ +!/sample/source \ No newline at end of file diff --git a/test/new_tests/dpath-variable/dub.json b/test/new_tests/dpath-variable/dub.json new file mode 100644 index 0000000000..9c1ee5401a --- /dev/null +++ b/test/new_tests/dpath-variable/dub.json @@ -0,0 +1,9 @@ +{ + "name": "test-dpath-variable", + "targetType": "executable", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/dpath-variable/dub.json b/test/new_tests/dpath-variable/sample/dub.json similarity index 100% rename from test/dpath-variable/dub.json rename to test/new_tests/dpath-variable/sample/dub.json diff --git a/test/dpath-variable/source/app.d b/test/new_tests/dpath-variable/sample/source/app.d similarity index 100% rename from test/dpath-variable/source/app.d rename to test/new_tests/dpath-variable/sample/source/app.d diff --git a/test/new_tests/dpath-variable/source/app.d b/test/new_tests/dpath-variable/source/app.d new file mode 100644 index 0000000000..830b691f60 --- /dev/null +++ b/test/new_tests/dpath-variable/source/app.d @@ -0,0 +1,32 @@ +import common; + +import std.file; +import std.process; +import std.path; +import std.stdio; + +void main () { + chdir("sample"); + environment.remove("DUB_HOME"); + + immutable dpath = getcwd().buildPath("dpath"); + if (dpath.exists) dpath.rmdirRecurse; + + auto p = spawnProcess([dub, "upgrade"], ["DPATH": dpath]); + if (p.wait != 0) + die("Dub upgrade failed"); + + if (!exists(dpath.buildPath("dub/packages/gitcompatibledubpackage/1.0.1/gitcompatibledubpackage/dub.json"))) + die("Did not get dependencies installed into $DPATH"); + + import std.json; + immutable jsonPath = JSONValue(dpath.buildPath("dub2")); + File("dub.settings.json", "w").writefln(`{ "dubHome": %s }`, jsonPath); + + p = spawnProcess([dub, "upgrade"]); + if (p.wait != 0) + die("Dub upgrade failed"); + + if (!exists(dpath.buildPath("dub2/packages/gitcompatibledubpackage/1.0.1/gitcompatibledubpackage/dub.json"))) + die("Did not get dependencies installed into dubHome (set from config)"); +} From 918dea89eb642580cc6a647b5452fc1692f61f2c Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Thu, 17 Jul 2025 19:29:01 +0300 Subject: [PATCH 042/187] dub-as-a-library-cwd Signed-off-by: Andrei Horodniceanu --- test/dub-as-a-library-cwd/.gitignore | 1 - test/dub-as-a-library-cwd/.no_test | 0 test/new_tests/dub-as-a-library-cwd/.gitignore | 5 +++++ test/new_tests/dub-as-a-library-cwd/dub.json | 9 +++++++++ .../dub-as-a-library-cwd/sample}/dub.json | 2 +- .../dub-as-a-library-cwd/sample}/source/app.d | 13 +++++++++---- .../dub-as-a-library-cwd/sample}/subproject/dub.sdl | 0 .../sample}/subproject/source/app.d | 0 test/new_tests/dub-as-a-library-cwd/source/app.d | 8 ++++++++ 9 files changed, 32 insertions(+), 6 deletions(-) delete mode 100644 test/dub-as-a-library-cwd/.gitignore delete mode 100644 test/dub-as-a-library-cwd/.no_test create mode 100644 test/new_tests/dub-as-a-library-cwd/.gitignore create mode 100644 test/new_tests/dub-as-a-library-cwd/dub.json rename test/{dub-as-a-library-cwd => new_tests/dub-as-a-library-cwd/sample}/dub.json (79%) rename test/{dub-as-a-library-cwd => new_tests/dub-as-a-library-cwd/sample}/source/app.d (81%) rename test/{dub-as-a-library-cwd => new_tests/dub-as-a-library-cwd/sample}/subproject/dub.sdl (100%) rename test/{dub-as-a-library-cwd => new_tests/dub-as-a-library-cwd/sample}/subproject/source/app.d (100%) create mode 100644 test/new_tests/dub-as-a-library-cwd/source/app.d diff --git a/test/dub-as-a-library-cwd/.gitignore b/test/dub-as-a-library-cwd/.gitignore deleted file mode 100644 index 9a2c0e86b4..0000000000 --- a/test/dub-as-a-library-cwd/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/dub-as-a-library-cwd diff --git a/test/dub-as-a-library-cwd/.no_test b/test/dub-as-a-library-cwd/.no_test deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/new_tests/dub-as-a-library-cwd/.gitignore b/test/new_tests/dub-as-a-library-cwd/.gitignore new file mode 100644 index 0000000000..70538d4cef --- /dev/null +++ b/test/new_tests/dub-as-a-library-cwd/.gitignore @@ -0,0 +1,5 @@ +/sample/* +!/sample/ +!/sample/source +!/sample/dub.json +!/sample/subproject diff --git a/test/new_tests/dub-as-a-library-cwd/dub.json b/test/new_tests/dub-as-a-library-cwd/dub.json new file mode 100644 index 0000000000..a6ef2cb4d5 --- /dev/null +++ b/test/new_tests/dub-as-a-library-cwd/dub.json @@ -0,0 +1,9 @@ +{ + "name": "test-dub-as-a-library-cwd", + "targetType": "executable", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/dub-as-a-library-cwd/dub.json b/test/new_tests/dub-as-a-library-cwd/sample/dub.json similarity index 79% rename from test/dub-as-a-library-cwd/dub.json rename to test/new_tests/dub-as-a-library-cwd/sample/dub.json index 958f419329..074e415736 100644 --- a/test/dub-as-a-library-cwd/dub.json +++ b/test/new_tests/dub-as-a-library-cwd/sample/dub.json @@ -3,7 +3,7 @@ "workingDirectory": ".", "dependencies": { "dub": { - "path": "../.." + "path": "../../../../" } } } diff --git a/test/dub-as-a-library-cwd/source/app.d b/test/new_tests/dub-as-a-library-cwd/sample/source/app.d similarity index 81% rename from test/dub-as-a-library-cwd/source/app.d rename to test/new_tests/dub-as-a-library-cwd/sample/source/app.d index 446c361a39..2063702e71 100644 --- a/test/dub-as-a-library-cwd/source/app.d +++ b/test/new_tests/dub-as-a-library-cwd/sample/source/app.d @@ -8,7 +8,7 @@ import std.file; import std.path; import std.stdio; -void main(string[] args) +void main() { auto project = buildNormalizedPath(getcwd, "subproject"); chdir(buildNormalizedPath(getcwd, "..")); @@ -31,10 +31,15 @@ void main(string[] args) dub.defaultCompiler, dub.defaultArchitecture); gs.compileCallback = (status, output) { + writeln(output); found = output.canFind("FIND_THIS_STRING"); - if (!found) - stderr.writeln("Did not find required string!\nExit status:", - status, "\n\nOutput:\n", output); + if (!found) { + writeln("[ERROR]: Did not find the requiring string!"); + writeln("Exit status: ", status); + writeln("Output:"); + writeln(output); + writeln("[FAIL]: Could not find the requiring string"); + } }; stderr.writeln("Checking if building works from a library in a different cwd:"); diff --git a/test/dub-as-a-library-cwd/subproject/dub.sdl b/test/new_tests/dub-as-a-library-cwd/sample/subproject/dub.sdl similarity index 100% rename from test/dub-as-a-library-cwd/subproject/dub.sdl rename to test/new_tests/dub-as-a-library-cwd/sample/subproject/dub.sdl diff --git a/test/dub-as-a-library-cwd/subproject/source/app.d b/test/new_tests/dub-as-a-library-cwd/sample/subproject/source/app.d similarity index 100% rename from test/dub-as-a-library-cwd/subproject/source/app.d rename to test/new_tests/dub-as-a-library-cwd/sample/subproject/source/app.d diff --git a/test/new_tests/dub-as-a-library-cwd/source/app.d b/test/new_tests/dub-as-a-library-cwd/source/app.d new file mode 100644 index 0000000000..822027fb5e --- /dev/null +++ b/test/new_tests/dub-as-a-library-cwd/source/app.d @@ -0,0 +1,8 @@ +import common; + +import std.process; + +void main () { + if (spawnProcess([dub, "--root=sample"]).wait != 0) + die("Dub --root failed"); +} From fc38ce4c18fed8212f9a5c6beebbe3118e5ef432 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Thu, 17 Jul 2025 20:49:38 +0300 Subject: [PATCH 043/187] dub-custom-root Signed-off-by: Andrei Horodniceanu --- test/dub-custom-root-2/.gitignore | 6 ------ test/dub-custom-root-2/.no_run | 0 test/dub-custom-root-2/.no_test | 0 test/dub-custom-root-2/source/app.d | 12 ------------ test/dub-custom-root.sh | 10 ---------- test/dub-custom-root/.gitignore | 6 ------ test/dub-custom-root/.no_run | 0 test/dub-custom-root/.no_test | 0 test/dub-custom-root/source/app.d | 10 ---------- test/new_tests/dub-custom-root/.gitignore | 9 +++++++++ .../dub-custom-root/custom-root-2}/dub.json | 0 .../dub-custom-root/custom-root-2/source/app.d | 13 +++++++++++++ .../dub-custom-root/custom-root}/dub.json | 0 .../dub-custom-root/custom-root/source/app.d | 10 ++++++++++ test/new_tests/dub-custom-root/dub.json | 9 +++++++++ test/new_tests/dub-custom-root/source/app.d | 13 +++++++++++++ 16 files changed, 54 insertions(+), 44 deletions(-) delete mode 100644 test/dub-custom-root-2/.gitignore delete mode 100644 test/dub-custom-root-2/.no_run delete mode 100644 test/dub-custom-root-2/.no_test delete mode 100644 test/dub-custom-root-2/source/app.d delete mode 100755 test/dub-custom-root.sh delete mode 100644 test/dub-custom-root/.gitignore delete mode 100644 test/dub-custom-root/.no_run delete mode 100644 test/dub-custom-root/.no_test delete mode 100644 test/dub-custom-root/source/app.d create mode 100644 test/new_tests/dub-custom-root/.gitignore rename test/{dub-custom-root-2 => new_tests/dub-custom-root/custom-root-2}/dub.json (100%) create mode 100644 test/new_tests/dub-custom-root/custom-root-2/source/app.d rename test/{dub-custom-root => new_tests/dub-custom-root/custom-root}/dub.json (100%) create mode 100644 test/new_tests/dub-custom-root/custom-root/source/app.d create mode 100644 test/new_tests/dub-custom-root/dub.json create mode 100644 test/new_tests/dub-custom-root/source/app.d diff --git a/test/dub-custom-root-2/.gitignore b/test/dub-custom-root-2/.gitignore deleted file mode 100644 index 2278645278..0000000000 --- a/test/dub-custom-root-2/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -.dub -docs.json -__dummy.html -*.o -*.obj -/target-exe diff --git a/test/dub-custom-root-2/.no_run b/test/dub-custom-root-2/.no_run deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/dub-custom-root-2/.no_test b/test/dub-custom-root-2/.no_test deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/dub-custom-root-2/source/app.d b/test/dub-custom-root-2/source/app.d deleted file mode 100644 index 5d07423ae0..0000000000 --- a/test/dub-custom-root-2/source/app.d +++ /dev/null @@ -1,12 +0,0 @@ -import std.file; -import std.path; -import std.stdio; -import std.string; - -void main() -{ - // run me from test/ with dub --root=dub-custom-root - string cwd = getcwd.chomp("/"); - assert(cwd.endsWith("test/dub-custom-root-2/source"), cwd); - writeln("ok"); -} diff --git a/test/dub-custom-root.sh b/test/dub-custom-root.sh deleted file mode 100755 index f7e52ca03a..0000000000 --- a/test/dub-custom-root.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash -. $(dirname "${BASH_SOURCE[0]}")/common.sh - -pushd "$CURR_DIR" - -$DUB --root=dub-custom-root - -$DUB --root=dub-custom-root-2 - -popd diff --git a/test/dub-custom-root/.gitignore b/test/dub-custom-root/.gitignore deleted file mode 100644 index 2278645278..0000000000 --- a/test/dub-custom-root/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -.dub -docs.json -__dummy.html -*.o -*.obj -/target-exe diff --git a/test/dub-custom-root/.no_run b/test/dub-custom-root/.no_run deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/dub-custom-root/.no_test b/test/dub-custom-root/.no_test deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/dub-custom-root/source/app.d b/test/dub-custom-root/source/app.d deleted file mode 100644 index 612dfe01dc..0000000000 --- a/test/dub-custom-root/source/app.d +++ /dev/null @@ -1,10 +0,0 @@ -import std.file; -import std.path; -import std.stdio; - -void main() -{ - // run me from test/ with dub --root=test/dub-custom-root - assert(getcwd.baseName == "test", getcwd); - writeln("ok"); -} diff --git a/test/new_tests/dub-custom-root/.gitignore b/test/new_tests/dub-custom-root/.gitignore new file mode 100644 index 0000000000..2bd6def578 --- /dev/null +++ b/test/new_tests/dub-custom-root/.gitignore @@ -0,0 +1,9 @@ +/custom-root/* +!/custom-root/ +!/custom-root/dub.json +!/custom-root/source/ + +/custom-root-2/* +!/custom-root-2/ +!/custom-root-2/dub.json +!/custom-root-2/source/ \ No newline at end of file diff --git a/test/dub-custom-root-2/dub.json b/test/new_tests/dub-custom-root/custom-root-2/dub.json similarity index 100% rename from test/dub-custom-root-2/dub.json rename to test/new_tests/dub-custom-root/custom-root-2/dub.json diff --git a/test/new_tests/dub-custom-root/custom-root-2/source/app.d b/test/new_tests/dub-custom-root/custom-root-2/source/app.d new file mode 100644 index 0000000000..e625b6de3c --- /dev/null +++ b/test/new_tests/dub-custom-root/custom-root-2/source/app.d @@ -0,0 +1,13 @@ +import std.file; +import std.path; +import std.stdio; +import std.string; + +void main() +{ + // run me from test/dub-custom-root with dub --root=custom-root-2 + string cwd = getcwd; + immutable expected = buildPath("new_tests", "dub-custom-root", "custom-root-2", "source"); + // TODO: new_tests => test + assert(cwd.endsWith(expected), cwd); +} diff --git a/test/dub-custom-root/dub.json b/test/new_tests/dub-custom-root/custom-root/dub.json similarity index 100% rename from test/dub-custom-root/dub.json rename to test/new_tests/dub-custom-root/custom-root/dub.json diff --git a/test/new_tests/dub-custom-root/custom-root/source/app.d b/test/new_tests/dub-custom-root/custom-root/source/app.d new file mode 100644 index 0000000000..e2ed7abccd --- /dev/null +++ b/test/new_tests/dub-custom-root/custom-root/source/app.d @@ -0,0 +1,10 @@ +import std.file; +import std.path; +import std.stdio; + +void main() +{ + // run me from test/dub-custom-root with dub --root=custom-root + // TODO: new_tests => tests + assert(getcwd.baseName == "dub-custom-root", getcwd); +} diff --git a/test/new_tests/dub-custom-root/dub.json b/test/new_tests/dub-custom-root/dub.json new file mode 100644 index 0000000000..becb33e1b7 --- /dev/null +++ b/test/new_tests/dub-custom-root/dub.json @@ -0,0 +1,9 @@ +{ + "name": "dub-custom-root", + "targetType": "executable", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/new_tests/dub-custom-root/source/app.d b/test/new_tests/dub-custom-root/source/app.d new file mode 100644 index 0000000000..757be42a43 --- /dev/null +++ b/test/new_tests/dub-custom-root/source/app.d @@ -0,0 +1,13 @@ +import common; + +import std.process; + +void main () { + auto p = spawnProcess([dub, "--root=custom-root"]); + if (p.wait != 0) + die("dub --root=custom-root failed"); + + p = spawnProcess([dub, "--root=custom-root-2"]); + if (p.wait != 0) + die("dub --root=custom-root-2 failed"); +} From eee872eefd75617047a5ce208f9bbca3594c896d Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Thu, 17 Jul 2025 21:02:24 +0300 Subject: [PATCH 044/187] dub_test_root Signed-off-by: Andrei Horodniceanu --- test/dub_test_root.sh | 23 ----------------------- test/new_tests/dub_test_root/dub.json | 9 +++++++++ test/new_tests/dub_test_root/source/app.d | 23 +++++++++++++++++++++++ 3 files changed, 32 insertions(+), 23 deletions(-) delete mode 100755 test/dub_test_root.sh create mode 100644 test/new_tests/dub_test_root/dub.json create mode 100644 test/new_tests/dub_test_root/source/app.d diff --git a/test/dub_test_root.sh b/test/dub_test_root.sh deleted file mode 100755 index 7c0f50b678..0000000000 --- a/test/dub_test_root.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bash - -# Make sure the auto-generated 'dub_test_root' module is importable for -# non-all-at-once compilations too. - -set -euo pipefail - -TMPDIR=$(mktemp -d "$(basename "$0").XXXXXX") - -pushd "$TMPDIR" -function cleanup { - popd - rm -rf "$TMPDIR" -} -trap cleanup EXIT - - -echo 'name "foo"' > dub.sdl - -mkdir -p source -echo 'import dub_test_root : allModules;' > source/foo.d - -$DUB test --build-mode=singleFile diff --git a/test/new_tests/dub_test_root/dub.json b/test/new_tests/dub_test_root/dub.json new file mode 100644 index 0000000000..51aef37bd9 --- /dev/null +++ b/test/new_tests/dub_test_root/dub.json @@ -0,0 +1,9 @@ +{ + "name": "test-dub_test_root", + "targetType": "executable", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/new_tests/dub_test_root/source/app.d b/test/new_tests/dub_test_root/source/app.d new file mode 100644 index 0000000000..a5c8b1fba9 --- /dev/null +++ b/test/new_tests/dub_test_root/source/app.d @@ -0,0 +1,23 @@ +import common; + +import std.file; +import std.path; +import std.process; + +void main () { + immutable dub = environment["DUB"]; + + immutable tmpDir = "tmp"; + if (tmpDir.exists) tmpDir.rmdirRecurse(); + + tmpDir.mkdir; + chdir(tmpDir); + "dub.sdl".write(`name "foo"`); + + "source".mkdir; + "source/foo.d".write(q{import dub_test_root : allModules;}); + + auto p = spawnProcess([dub, "test", "--build-mode=singleFile"]); + if (p.wait != 0) + die("Dub test failed"); +} From 2711bdf84ead0227e2d54774fd2a6232d284a2d5 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Thu, 17 Jul 2025 21:24:51 +0300 Subject: [PATCH 045/187] dustmite-no-redirect Signed-off-by: Andrei Horodniceanu --- test/dustmite-no-redirect-test/.no_build | 0 test/dustmite-no-redirect.sh | 26 -------------- .../new_tests/dustmite-no-redirect/.gitignore | 4 +++ test/new_tests/dustmite-no-redirect/dub.json | 9 +++++ .../dustmite-no-redirect/sample}/dub.json | 0 .../dustmite-no-redirect/sample}/source/app.d | 0 .../dustmite-no-redirect/source/app.d | 36 +++++++++++++++++++ 7 files changed, 49 insertions(+), 26 deletions(-) delete mode 100644 test/dustmite-no-redirect-test/.no_build delete mode 100755 test/dustmite-no-redirect.sh create mode 100644 test/new_tests/dustmite-no-redirect/.gitignore create mode 100644 test/new_tests/dustmite-no-redirect/dub.json rename test/{dustmite-no-redirect-test/project => new_tests/dustmite-no-redirect/sample}/dub.json (100%) rename test/{dustmite-no-redirect-test/project => new_tests/dustmite-no-redirect/sample}/source/app.d (100%) create mode 100644 test/new_tests/dustmite-no-redirect/source/app.d diff --git a/test/dustmite-no-redirect-test/.no_build b/test/dustmite-no-redirect-test/.no_build deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/dustmite-no-redirect.sh b/test/dustmite-no-redirect.sh deleted file mode 100755 index 30c6b9c308..0000000000 --- a/test/dustmite-no-redirect.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash - -if ! command -v dustmite &> /dev/null -then - echo "Skipping test because dustmite is not installed!" - exit 0 -fi - -. $(dirname "${BASH_SOURCE[0]}")/common.sh - -DM_TEST="$CURR_DIR/dustmite-no-redirect-test/project" -DM_TMP="$DM_TEST-dusting" -EXPECTED="This text should be shown!" -LOG="$DM_TEST.log" - -rm -rf $DM_TMP $DM_TMP.* - -$DUB --root=$DM_TEST dustmite --no-redirect --program-status=1 $DM_TMP &> $LOG || true - -if ! grep -q "$EXPECTED" "$LOG" -then - cat $LOG - die $LINENO "Diff between expected and actual output" -fi - -rm -rf $DM_TMP $DM_TMP.* $LOG diff --git a/test/new_tests/dustmite-no-redirect/.gitignore b/test/new_tests/dustmite-no-redirect/.gitignore new file mode 100644 index 0000000000..60ec48da42 --- /dev/null +++ b/test/new_tests/dustmite-no-redirect/.gitignore @@ -0,0 +1,4 @@ +/sample/* +!/sample +!/sample/source +!/sample/dub.json \ No newline at end of file diff --git a/test/new_tests/dustmite-no-redirect/dub.json b/test/new_tests/dustmite-no-redirect/dub.json new file mode 100644 index 0000000000..02229783a9 --- /dev/null +++ b/test/new_tests/dustmite-no-redirect/dub.json @@ -0,0 +1,9 @@ +{ + "name": "test-dustmite-no-redirect", + "targetType": "executable", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/dustmite-no-redirect-test/project/dub.json b/test/new_tests/dustmite-no-redirect/sample/dub.json similarity index 100% rename from test/dustmite-no-redirect-test/project/dub.json rename to test/new_tests/dustmite-no-redirect/sample/dub.json diff --git a/test/dustmite-no-redirect-test/project/source/app.d b/test/new_tests/dustmite-no-redirect/sample/source/app.d similarity index 100% rename from test/dustmite-no-redirect-test/project/source/app.d rename to test/new_tests/dustmite-no-redirect/sample/source/app.d diff --git a/test/new_tests/dustmite-no-redirect/source/app.d b/test/new_tests/dustmite-no-redirect/source/app.d new file mode 100644 index 0000000000..4e1b97a39d --- /dev/null +++ b/test/new_tests/dustmite-no-redirect/source/app.d @@ -0,0 +1,36 @@ +import common; + +import std.algorithm; +import std.file; +import std.path; +import std.process; +import std.stdio; + +void main () { + // are DFLAGS unquoted? + environment.remove("DFLAGS"); + + bool doSkip = false; + try { + if (!execute("dustmite").status != 0) + doSkip = true; + } catch (ProcessException) + doSkip = true; + + if (doSkip) + skip("dustmite not found in $PATH"); + + immutable testDir = "sample"; + immutable tmpDir = "sample-dusting"; + immutable expected = "This text should be shown!"; + + dirEntries(".", tmpDir ~ "*", SpanMode.shallow) + .each!rmdirRecurse; + + auto p = execute([dub, "--root=" ~ testDir, "dustmite", "--no-redirect", "--program-status=1", tmpDir]); + + if (!p.output.canFind(expected)) { + writeln(p.output); + die("Diff between expected and actual output"); + } +} From 0cef8e8f14df4abe6b64801bfac12d5560adc9f7 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Thu, 17 Jul 2025 21:32:51 +0300 Subject: [PATCH 046/187] d-versions Signed-off-by: Andrei Horodniceanu --- test/d-versions.sh | 5 ----- test/d-versions/.gitignore | 1 - test/d-versions/.no_build | 0 test/d-versions/.no_run | 0 test/d-versions/.no_test | 0 test/new_tests/d-versions/.gitignore | 4 ++++ test/new_tests/d-versions/dub.json | 9 +++++++++ .../d-versions/sample}/dub.sdl | 0 .../d-versions/sample}/source/app.d | 0 test/new_tests/d-versions/source/app.d | 11 +++++++++++ 10 files changed, 24 insertions(+), 6 deletions(-) delete mode 100755 test/d-versions.sh delete mode 100644 test/d-versions/.gitignore delete mode 100644 test/d-versions/.no_build delete mode 100644 test/d-versions/.no_run delete mode 100644 test/d-versions/.no_test create mode 100644 test/new_tests/d-versions/.gitignore create mode 100644 test/new_tests/d-versions/dub.json rename test/{d-versions => new_tests/d-versions/sample}/dub.sdl (100%) rename test/{d-versions => new_tests/d-versions/sample}/source/app.d (100%) create mode 100644 test/new_tests/d-versions/source/app.d diff --git a/test/d-versions.sh b/test/d-versions.sh deleted file mode 100755 index f9e7da821a..0000000000 --- a/test/d-versions.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash - -. $(dirname "${BASH_SOURCE[0]}")/common.sh -cd ${CURR_DIR}/d-versions -${DUB} build --d-version=FromCli1 --d-version=FromCli2 diff --git a/test/d-versions/.gitignore b/test/d-versions/.gitignore deleted file mode 100644 index d4b51c642d..0000000000 --- a/test/d-versions/.gitignore +++ /dev/null @@ -1 +0,0 @@ -d-versions diff --git a/test/d-versions/.no_build b/test/d-versions/.no_build deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/d-versions/.no_run b/test/d-versions/.no_run deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/d-versions/.no_test b/test/d-versions/.no_test deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/new_tests/d-versions/.gitignore b/test/new_tests/d-versions/.gitignore new file mode 100644 index 0000000000..ecae94ed7e --- /dev/null +++ b/test/new_tests/d-versions/.gitignore @@ -0,0 +1,4 @@ +/sample/* +!/sample/ +!/sample/source +!/sample/dub.sdl \ No newline at end of file diff --git a/test/new_tests/d-versions/dub.json b/test/new_tests/d-versions/dub.json new file mode 100644 index 0000000000..93ab6ea051 --- /dev/null +++ b/test/new_tests/d-versions/dub.json @@ -0,0 +1,9 @@ +{ + "name": "test-d-versions", + "targetType": "executable", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/d-versions/dub.sdl b/test/new_tests/d-versions/sample/dub.sdl similarity index 100% rename from test/d-versions/dub.sdl rename to test/new_tests/d-versions/sample/dub.sdl diff --git a/test/d-versions/source/app.d b/test/new_tests/d-versions/sample/source/app.d similarity index 100% rename from test/d-versions/source/app.d rename to test/new_tests/d-versions/sample/source/app.d diff --git a/test/new_tests/d-versions/source/app.d b/test/new_tests/d-versions/source/app.d new file mode 100644 index 0000000000..dd3d6aef6d --- /dev/null +++ b/test/new_tests/d-versions/source/app.d @@ -0,0 +1,11 @@ +import common; + +import std.file; +import std.path; +import std.process; + +void main () { + auto p = spawnProcess([dub, "build", "--d-version=FromCli1", "--d-version=FromCli2"], null, Config.none, "sample"); + if (p.wait != 0) + die("dub build failed"); +} From 6d9af7be36d3d0cffef740a691dc66fc622d0545 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Thu, 17 Jul 2025 21:42:36 +0300 Subject: [PATCH 047/187] environment-variables Signed-off-by: Andrei Horodniceanu --- test/environment-variables/.gitignore | 12 ----------- test/environment-variables/.no_build | 1 - test/environment-variables/.no_run | 1 - test/environment-variables/.no_test | 1 - .../environment-variables/.gitignore | 11 ++++++++++ test/new_tests/environment-variables/dub.json | 9 +++++++++ .../sample}/deppkg/dub.json | 6 +++--- .../sample}/deppkg/source/deppkg/foo.d | 0 .../environment-variables/sample}/dub.json | 8 ++++---- .../sample}/dub.settings.json | 0 .../sample}/source/app.d | 0 .../environment-variables/source/app.d} | 20 +++++++++++-------- 12 files changed, 39 insertions(+), 30 deletions(-) delete mode 100644 test/environment-variables/.gitignore delete mode 100644 test/environment-variables/.no_build delete mode 100644 test/environment-variables/.no_run delete mode 100644 test/environment-variables/.no_test create mode 100644 test/new_tests/environment-variables/.gitignore create mode 100644 test/new_tests/environment-variables/dub.json rename test/{environment-variables => new_tests/environment-variables/sample}/deppkg/dub.json (96%) rename test/{environment-variables => new_tests/environment-variables/sample}/deppkg/source/deppkg/foo.d (100%) rename test/{environment-variables => new_tests/environment-variables/sample}/dub.json (95%) rename test/{environment-variables => new_tests/environment-variables/sample}/dub.settings.json (100%) rename test/{environment-variables => new_tests/environment-variables/sample}/source/app.d (100%) rename test/{environment-variables.script.d => new_tests/environment-variables/source/app.d} (94%) diff --git a/test/environment-variables/.gitignore b/test/environment-variables/.gitignore deleted file mode 100644 index 58891a280a..0000000000 --- a/test/environment-variables/.gitignore +++ /dev/null @@ -1,12 +0,0 @@ -* -!.no_build -!.no_test -!.no_run -!dub.json -!dub.settings.json -!source -!source/app.d -!deppkg -!deppkg/dub.json -!deppkg/source/deppkg/foo.d - diff --git a/test/environment-variables/.no_build b/test/environment-variables/.no_build deleted file mode 100644 index d3f5a12faa..0000000000 --- a/test/environment-variables/.no_build +++ /dev/null @@ -1 +0,0 @@ - diff --git a/test/environment-variables/.no_run b/test/environment-variables/.no_run deleted file mode 100644 index d3f5a12faa..0000000000 --- a/test/environment-variables/.no_run +++ /dev/null @@ -1 +0,0 @@ - diff --git a/test/environment-variables/.no_test b/test/environment-variables/.no_test deleted file mode 100644 index d3f5a12faa..0000000000 --- a/test/environment-variables/.no_test +++ /dev/null @@ -1 +0,0 @@ - diff --git a/test/new_tests/environment-variables/.gitignore b/test/new_tests/environment-variables/.gitignore new file mode 100644 index 0000000000..a5fb3feade --- /dev/null +++ b/test/new_tests/environment-variables/.gitignore @@ -0,0 +1,11 @@ +/sample/* + +!/sample +!/sample/dub.json +!/sample/dub.settings.json +!/sample/source/ + +!/sample/deppkg/ +!/sample/deppkg/dub.json +!/sample/deppkg/source/ +!/sample/deppkg/dub.settings.json \ No newline at end of file diff --git a/test/new_tests/environment-variables/dub.json b/test/new_tests/environment-variables/dub.json new file mode 100644 index 0000000000..77cbf489a8 --- /dev/null +++ b/test/new_tests/environment-variables/dub.json @@ -0,0 +1,9 @@ +{ + "name": "test-environment-variables", + "targetType": "executable", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/environment-variables/deppkg/dub.json b/test/new_tests/environment-variables/sample/deppkg/dub.json similarity index 96% rename from test/environment-variables/deppkg/dub.json rename to test/new_tests/environment-variables/sample/deppkg/dub.json index 10e9fc843a..8eb399ab4c 100644 --- a/test/environment-variables/deppkg/dub.json +++ b/test/new_tests/environment-variables/sample/deppkg/dub.json @@ -1,7 +1,7 @@ { - "name": "deppkg", + "name": "environment-variables-deppkg", "targetType": "library", - + "environments": { "VAR1": "deppkg.VAR1", "VAR3": "deppkg.VAR3", @@ -21,7 +21,7 @@ "PRIORITYCHECK_ROOTBLDSPEC_DEPSPEC": "deppkg.PRIORITYCHECK_ROOTBLDSPEC_DEPSPEC", "PRIORITYCHECK_DEPSPEC_ROOTSPEC": "deppkg.PRIORITYCHECK_DEPSPEC_ROOTSPEC" }, - + "preBuildCommands": [ "echo deppkg.preBuild: $PRIORITYCHECK_ROOT_DEPBLDSPEC", "echo deppkg.preBuild: $PRIORITYCHECK_DEPBLDSPEC_ROOTBLDSPEC", diff --git a/test/environment-variables/deppkg/source/deppkg/foo.d b/test/new_tests/environment-variables/sample/deppkg/source/deppkg/foo.d similarity index 100% rename from test/environment-variables/deppkg/source/deppkg/foo.d rename to test/new_tests/environment-variables/sample/deppkg/source/deppkg/foo.d diff --git a/test/environment-variables/dub.json b/test/new_tests/environment-variables/sample/dub.json similarity index 95% rename from test/environment-variables/dub.json rename to test/new_tests/environment-variables/sample/dub.json index ceab672d32..6e6395ff13 100644 --- a/test/environment-variables/dub.json +++ b/test/new_tests/environment-variables/sample/dub.json @@ -1,9 +1,9 @@ { - "name": "environment-variables", + "name": "environment-variables-test", "dependencies": { - "deppkg": {"path": "deppkg"} + "environment-variables-deppkg": {"path": "deppkg"} }, - + "environments": { "ENVIRONMENTS": "root.environments", "VAR1": "root.VAR1", @@ -40,7 +40,7 @@ "postRunEnvironments": { "POST_RUN_ENVIRONMENTS": "root.postRunEnvironments" }, - + "preGenerateCommands": [ "echo root.preGenerate: $PRIORITYCHECK_SYS_SET", "echo root.preGenerate: $PRIORITYCHECK_SET_DEP", diff --git a/test/environment-variables/dub.settings.json b/test/new_tests/environment-variables/sample/dub.settings.json similarity index 100% rename from test/environment-variables/dub.settings.json rename to test/new_tests/environment-variables/sample/dub.settings.json diff --git a/test/environment-variables/source/app.d b/test/new_tests/environment-variables/sample/source/app.d similarity index 100% rename from test/environment-variables/source/app.d rename to test/new_tests/environment-variables/sample/source/app.d diff --git a/test/environment-variables.script.d b/test/new_tests/environment-variables/source/app.d similarity index 94% rename from test/environment-variables.script.d rename to test/new_tests/environment-variables/source/app.d index 347f696822..47608b052f 100644 --- a/test/environment-variables.script.d +++ b/test/new_tests/environment-variables/source/app.d @@ -1,12 +1,12 @@ -/+ dub.json: { - "name": "environment_variables" -} +/ module environment_variables; + +import common; + import std; void main() { - auto currDir = environment.get("CURR_DIR", __FILE_FULL_PATH__.dirName()); + auto currDir = environment.get("CURR_DIR"); // preGenerateCommands uses system.environments < settings.environments < deppkg.environments < root.environments < deppkg.preGenerateEnvironments < root.preGenerateEnvironments // preBuildCommands uses system.environments < settings.environments < deppkg.environments < root.environments < deppkg.buildEnvironments < root.buildEnvironments < deppkg.preBuildEnvironments < root.preBuildEnvironments // Build tools uses system.environments < settings.environments < deppkg.environments < root.environments < deppkg.buildEnvironments < root.buildEnvironments @@ -43,13 +43,17 @@ void main() // expantion check: system.SYSENVVAREXPCHECK // postRunCommands [in deppkg][in root] // expantion check: deppkg.VAR4 - auto res = execute([environment.get("DUB", "dub"), "run", "-f"], [ + auto res = execute([dub, "run", "-f"], [ "PRIORITYCHECK_SYS_SET": "system.PRIORITYCHECK_SYS_SET", "SYSENVVAREXPCHECK": "system.SYSENVVAREXPCHECK", "VAR5": "system.VAR5" - ], Config.none, size_t.max, currDir.buildPath("environment-variables")); - scope (failure) - writeln("environment-variables test failed... Testing stdout is:\n-----\n", res.output); + ], Config.none, size_t.max, "sample"); + scope (failure) { + writeln("environment-variables test failed..."); + writeln("Testing stdout is:"); + writeln(res.output); + die("environment-variables test failed"); + } // preGenerateCommands [in root] assert(res.output.canFind("root.preGenerate: setting.PRIORITYCHECK_SYS_SET"), "preGenerate environment variables priority check is failed."); From 93e2408ddfb9bd0f70b741a797d892ba6525d947 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Thu, 17 Jul 2025 22:44:06 +0300 Subject: [PATCH 048/187] feat663-search Signed-off-by: Andrei Horodniceanu --- test/feat663-search.sh | 15 ------- test/new_tests/feat663-search/dub.json | 9 +++++ test/new_tests/feat663-search/source/app.d | 47 ++++++++++++++++++++++ 3 files changed, 56 insertions(+), 15 deletions(-) delete mode 100755 test/feat663-search.sh create mode 100644 test/new_tests/feat663-search/dub.json create mode 100644 test/new_tests/feat663-search/source/app.d diff --git a/test/feat663-search.sh b/test/feat663-search.sh deleted file mode 100755 index 77289a688e..0000000000 --- a/test/feat663-search.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env bash - -. $(dirname "${BASH_SOURCE[0]}")/common.sh -if ${DUB} search 2>/dev/null; then - die $LINENO '`dub search` succeeded' -fi -if ${DUB} search nonexistent123456789package 2>/dev/null; then - die $LINENO '`dub search nonexistent123456789package` succeeded' -fi -if ! OUTPUT=$(${DUB} search '"dub-registry"' -v 2>&1); then - die $LINENO '`dub search "dub-registry"` failed' "$OUTPUT" -fi -if ! grep -q '^\s\sdub-registry (.*)\s'<<<"$OUTPUT"; then - die $LINENO '`grep -q '"'"'^\s\sdub-registry (.*)\s'"'"'` failed' "$OUTPUT" -fi diff --git a/test/new_tests/feat663-search/dub.json b/test/new_tests/feat663-search/dub.json new file mode 100644 index 0000000000..280e83c616 --- /dev/null +++ b/test/new_tests/feat663-search/dub.json @@ -0,0 +1,9 @@ +{ + "name": "test-feat663-search", + "targetType": "executable", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/new_tests/feat663-search/source/app.d b/test/new_tests/feat663-search/source/app.d new file mode 100644 index 0000000000..4cdceef4c9 --- /dev/null +++ b/test/new_tests/feat663-search/source/app.d @@ -0,0 +1,47 @@ +import common; + +import std.algorithm; +import std.array; +import std.file; +import std.path; +import std.process; +import std.stdio; + +void main () { + { + auto p = execute([dub, "search"]); + if (p.status == 0) + die("`dub search` succeeded"); + } + + { + auto p = execute([dub, "search", "nonexistent123456789package"]); + if (p.status == 0) + die("`dub search nonexistent123456789package` succeeded"); + } + + { + auto p = pipeProcess([dub, "search", `"dub-registry"`], Redirect.stdout | Redirect.stderrToStdout); + const output = p.stdout.byLineCopy.array; + + if (p.pid.wait != 0) { + immutable error = q"(`dub search "dub-registry"` failed)"; + writeln(error); + writeln("Output:"); + foreach (line; output) + writeln(line); + die(error); + } + + import std.regex; + auto r = regex(`^\s\sdub-registry \(.*\)\s`); + if (!output.any!(line => line.matchFirst(r))) { + immutable error = q"(`dub search "dub-registry"` did not contain the desired line)"; + writeln(error); + writeln("Output:"); + foreach (line; output) + writeln(line); + die(error); + } + } +} From e3c180c60c48f6aa0fd04f47fa068ca0b2645fec Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Wed, 23 Jul 2025 23:01:14 +0300 Subject: [PATCH 049/187] extra/test_registry Fix a windows failure with the usage of PosixPath instead of NativePath Signed-off-by: Andrei Horodniceanu --- test/new_tests/extra/test_registry/.gitignore | 3 ++ test/new_tests/extra/test_registry/dub.json | 3 ++ .../source/test_registry_helper.d | 54 +++++++++++++++++++ .../extra/test_registry}/test_registry.d | 2 +- 4 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 test/new_tests/extra/test_registry/.gitignore create mode 100644 test/new_tests/extra/test_registry/dub.json create mode 100644 test/new_tests/extra/test_registry/source/test_registry_helper.d rename test/{ => new_tests/extra/test_registry}/test_registry.d (97%) diff --git a/test/new_tests/extra/test_registry/.gitignore b/test/new_tests/extra/test_registry/.gitignore new file mode 100644 index 0000000000..0c4c3c4aa2 --- /dev/null +++ b/test/new_tests/extra/test_registry/.gitignore @@ -0,0 +1,3 @@ +!/source/ +!/source/*.d +!/test_registry.d diff --git a/test/new_tests/extra/test_registry/dub.json b/test/new_tests/extra/test_registry/dub.json new file mode 100644 index 0000000000..b71c03056f --- /dev/null +++ b/test/new_tests/extra/test_registry/dub.json @@ -0,0 +1,3 @@ +{ + "name": "test_registry_helper" +} diff --git a/test/new_tests/extra/test_registry/source/test_registry_helper.d b/test/new_tests/extra/test_registry/source/test_registry_helper.d new file mode 100644 index 0000000000..2665558647 --- /dev/null +++ b/test/new_tests/extra/test_registry/source/test_registry_helper.d @@ -0,0 +1,54 @@ +module test_registry_helper; + +import std.process; +import std.stdio; + +struct TestRegistry { + immutable string port; + + this(string folder) { + import std.path; + import std.conv; + + immutable dir = __FILE_FULL_PATH__.dirName.dirName; + immutable testRegistrySrc = dir.buildPath("test_registry.d"); + immutable testRegistryExe = dir.buildPath("test_registry"); + immutable dub = environment["DUB"]; + // A path independent of the current test's dubHome + immutable newDubHome = dir.buildPath("dub"); + + auto p = spawnProcess( + [dub, "build", "--single", testRegistrySrc], + ["DUB_HOME": newDubHome] + ); + if (p.wait != 0) { + writeln("[FAIL]: dub build test_registry failed"); + throw new Exception("dub build test_registry failed"); + } + + this.port = text(getRandomPort); + this.pid = spawnProcess([testRegistryExe, "--folder=" ~ folder, "--port=" ~ port]); + + import core.time; + import core.thread.osthread; + Thread.sleep(1.seconds); + } + + ~this() { + scope(exit) wait(this.pid); + try { + writeln("--- The next few lines are test_registry shutting down, don't worry about them"); + stdout.flush(); + kill(this.pid); + } catch (ProcessException) {} + } + +private: + Pid pid; + static ushort getRandomPort() { + ushort result = cast(ushort)(thisProcessID % ushort.max); + if (result < 1024) + result += 1025; + return result; + } +} diff --git a/test/test_registry.d b/test/new_tests/extra/test_registry/test_registry.d similarity index 97% rename from test/test_registry.d rename to test/new_tests/extra/test_registry/test_registry.d index 6e98466028..fdb1920110 100755 --- a/test/test_registry.d +++ b/test/new_tests/extra/test_registry/test_registry.d @@ -34,7 +34,7 @@ auto apiFileHandler(string skip, string folder) { requestURI.skipOver(skip); const reqFile = buildPath(folder, requestURI); if (reqFile.exists) { - return req.sendFile(res, PosixPath(reqFile)); + return req.sendFile(res, NativePath(reqFile)); } } return toDelegate(&handler); From c2891f17adc8c38e4c280ec2c806ba122c2aad27 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Wed, 23 Jul 2025 23:02:15 +0300 Subject: [PATCH 050/187] extra/issue1336-registry Signed-off-by: Andrei Horodniceanu --- test/issue1336-registry/.gitignore | 14 -------------- test/issue1336-registry/.no_build | 0 .../new_tests/extra/issue1336-registry/.gitignore | 4 ++++ ...%22%5D&include_dependencies=true&minimize=true | 0 .../packages/gitcompatibledubpackage/1.0.2.zip | 0 .../packages/gitcompatibledubpackage/1.0.3.zip | 0 .../packages/gitcompatibledubpackage/1.0.4.zip | Bin 7 files changed, 4 insertions(+), 14 deletions(-) delete mode 100644 test/issue1336-registry/.gitignore delete mode 100644 test/issue1336-registry/.no_build create mode 100644 test/new_tests/extra/issue1336-registry/.gitignore rename test/{ => new_tests/extra}/issue1336-registry/api/packages/infos__packages=%5B%22gitcompatibledubpackage%22%5D&include_dependencies=true&minimize=true (100%) rename test/{ => new_tests/extra}/issue1336-registry/packages/gitcompatibledubpackage/1.0.2.zip (100%) rename test/{ => new_tests/extra}/issue1336-registry/packages/gitcompatibledubpackage/1.0.3.zip (100%) rename test/{ => new_tests/extra}/issue1336-registry/packages/gitcompatibledubpackage/1.0.4.zip (100%) diff --git a/test/issue1336-registry/.gitignore b/test/issue1336-registry/.gitignore deleted file mode 100644 index 86e1bdf49c..0000000000 --- a/test/issue1336-registry/.gitignore +++ /dev/null @@ -1,14 +0,0 @@ -.dub -docs.json -__dummy.html -docs/ -issue1336-registry.so -issue1336-registry.dylib -issue1336-registry.dll -issue1336-registry.a -issue1336-registry.lib -issue1336-registry-test-* -*.exe -*.o -*.obj -*.lst diff --git a/test/issue1336-registry/.no_build b/test/issue1336-registry/.no_build deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/new_tests/extra/issue1336-registry/.gitignore b/test/new_tests/extra/issue1336-registry/.gitignore new file mode 100644 index 0000000000..da495fc466 --- /dev/null +++ b/test/new_tests/extra/issue1336-registry/.gitignore @@ -0,0 +1,4 @@ +!/api/ +!/api/** +!/packages/ +!/packages/** \ No newline at end of file diff --git a/test/issue1336-registry/api/packages/infos__packages=%5B%22gitcompatibledubpackage%22%5D&include_dependencies=true&minimize=true b/test/new_tests/extra/issue1336-registry/api/packages/infos__packages=%5B%22gitcompatibledubpackage%22%5D&include_dependencies=true&minimize=true similarity index 100% rename from test/issue1336-registry/api/packages/infos__packages=%5B%22gitcompatibledubpackage%22%5D&include_dependencies=true&minimize=true rename to test/new_tests/extra/issue1336-registry/api/packages/infos__packages=%5B%22gitcompatibledubpackage%22%5D&include_dependencies=true&minimize=true diff --git a/test/issue1336-registry/packages/gitcompatibledubpackage/1.0.2.zip b/test/new_tests/extra/issue1336-registry/packages/gitcompatibledubpackage/1.0.2.zip similarity index 100% rename from test/issue1336-registry/packages/gitcompatibledubpackage/1.0.2.zip rename to test/new_tests/extra/issue1336-registry/packages/gitcompatibledubpackage/1.0.2.zip diff --git a/test/issue1336-registry/packages/gitcompatibledubpackage/1.0.3.zip b/test/new_tests/extra/issue1336-registry/packages/gitcompatibledubpackage/1.0.3.zip similarity index 100% rename from test/issue1336-registry/packages/gitcompatibledubpackage/1.0.3.zip rename to test/new_tests/extra/issue1336-registry/packages/gitcompatibledubpackage/1.0.3.zip diff --git a/test/issue1336-registry/packages/gitcompatibledubpackage/1.0.4.zip b/test/new_tests/extra/issue1336-registry/packages/gitcompatibledubpackage/1.0.4.zip similarity index 100% rename from test/issue1336-registry/packages/gitcompatibledubpackage/1.0.4.zip rename to test/new_tests/extra/issue1336-registry/packages/gitcompatibledubpackage/1.0.4.zip From fa32f9a3a2b96f61b37b4151cc72dca005868eb6 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Wed, 23 Jul 2025 23:02:28 +0300 Subject: [PATCH 051/187] fetchzip Signed-off-by: Andrei Horodniceanu --- test/fetchzip.sh | 59 ------------- test/fetchzip.sh.min_frontend | 1 - test/new_tests/fetchzip/dub.json | 12 +++ test/new_tests/fetchzip/source/app.d | 122 +++++++++++++++++++++++++++ test/new_tests/fetchzip/test.config | 3 + 5 files changed, 137 insertions(+), 60 deletions(-) delete mode 100755 test/fetchzip.sh delete mode 100644 test/fetchzip.sh.min_frontend create mode 100644 test/new_tests/fetchzip/dub.json create mode 100644 test/new_tests/fetchzip/source/app.d create mode 100644 test/new_tests/fetchzip/test.config diff --git a/test/fetchzip.sh b/test/fetchzip.sh deleted file mode 100755 index d5917d4f1b..0000000000 --- a/test/fetchzip.sh +++ /dev/null @@ -1,59 +0,0 @@ -#!/usr/bin/env bash -DIR=$(dirname "${BASH_SOURCE[0]}") - -. "$DIR"/common.sh - -PORT=$(getRandomPort) - -${DUB} remove gitcompatibledubpackage --non-interactive 2>/dev/null || true - -${DUB} build --single "$DIR"/test_registry.d -"$DIR"/test_registry --folder="$DIR/issue1336-registry" --port=$PORT & -PID=$! -sleep 1 -trap 'kill $PID 2>/dev/null || true' exit - -echo "Trying to download gitcompatibledubpackage (1.0.4)" -timeout 1s ${DUB} fetch gitcompatibledubpackage@1.0.4 --skip-registry=all --registry=http://localhost:$PORT -if [ $? -eq 124 ]; then - die $LINENO 'Fetching from responsive registry should not time-out.' -fi -${DUB} remove gitcompatibledubpackage@1.0.4 - -echo "Downloads should be retried when the zip is corrupted - gitcompatibledubpackage (1.0.3)" -zipOut=$(! timeout 1s ${DUB} fetch gitcompatibledubpackage@1.0.3 --skip-registry=all --registry=http://localhost:$PORT 2>&1) -rc=$? - -if ! zipCount=$(grep -Fc 'Failed to extract zip archive' <<<"$zipOut") || [ "$zipCount" -lt 3 ] ; then - echo '========== +Output was ==========' >&2 - echo "$zipOut" >&2 - echo '========== -Output was ==========' >&2 - die $LINENO 'DUB should have tried to download the zip archive multiple times.' -elif [ $rc -eq 124 ]; then - die $LINENO 'DUB timed out unexpectedly.' -fi -if ${DUB} remove gitcompatibledubpackage --non-interactive 2>/dev/null; then - die $LINENO 'DUB should not have installed a broken package.' -fi - -echo "HTTP status errors on downloads should be retried - gitcompatibledubpackage (1.0.2)" -retryOut=$(! timeout 1s ${DUB} fetch gitcompatibledubpackage@1.0.2 --skip-registry=all --registry=http://localhost:$PORT --vverbose 2>&1) -rc=$? -if ! retryCount=$(echo "$retryOut" | grep -Fc 'Bad Gateway') || [ "$retryCount" -lt 3 ] ; then - echo '========== +Output was ==========' >&2 - echo "$retryOut" >&2 - echo '========== -Output was ==========' >&2 - die $LINENO "DUB should have retried download on server error multiple times, but only tried $retryCount times." -elif [ $rc -eq 124 ]; then - die $LINENO 'DUB timed out unexpectedly.' -fi -if ${DUB} remove gitcompatibledubpackage --non-interactive 2>/dev/null; then - die $LINENO 'DUB should not have installed a package.' -fi - -echo "HTTP status errors on downloads should retry with fallback mirror - gitcompatibledubpackage (1.0.2)" -timeout 1s "$DUB" fetch gitcompatibledubpackage@1.0.2 --skip-registry=all --registry="http://localhost:$PORT http://localhost:$PORT/fallback" -if [ $? -eq 124 ]; then - die $LINENO 'Fetching from responsive registry should not time-out.' -fi -${DUB} remove gitcompatibledubpackage@1.0.2 diff --git a/test/fetchzip.sh.min_frontend b/test/fetchzip.sh.min_frontend deleted file mode 100644 index 4817f99644..0000000000 --- a/test/fetchzip.sh.min_frontend +++ /dev/null @@ -1 +0,0 @@ -2.077 diff --git a/test/new_tests/fetchzip/dub.json b/test/new_tests/fetchzip/dub.json new file mode 100644 index 0000000000..d168630ec3 --- /dev/null +++ b/test/new_tests/fetchzip/dub.json @@ -0,0 +1,12 @@ +{ + "name": "test-fetchzip", + "targetType": "executable", + "dependencies": { + "common": { + "path": "../common" + }, + "test_registry_helper": { + "path": "../extra/test_registry" + } + } +} diff --git a/test/new_tests/fetchzip/source/app.d b/test/new_tests/fetchzip/source/app.d new file mode 100644 index 0000000000..90aa4c5e13 --- /dev/null +++ b/test/new_tests/fetchzip/source/app.d @@ -0,0 +1,122 @@ +import common; +import test_registry_helper; + +import core.time; +import core.thread.osthread; +import std.array; +import std.conv; +import std.file; +import std.format; +import std.process; +import std.path; +import std.range; +import std.regex; +import std.stdio; + +void main () { + auto testRegistry = TestRegistry("../extra/issue1336-registry"); + immutable port = testRegistry.port; + + // ignore failure + execute([dub, "remove", "gitcompatibledubpackage", "--non-interactive"]); + + immutable registryArgs = [ + "--skip-registry=all", + "--registry=http://localhost:" ~ text(port), + ]; + + log("Trying to download gitcompatibledubpackage (1.0.4)"); + { + auto pid = spawnProcess([dub, "fetch", "gitcompatibledubpackage@1.0.4"] ~ registryArgs); + scope(exit) pid.wait; + + // no waitTimeout function for non-windows :( + Thread.sleep(timeoutDuration); + auto r = pid.tryWait; + if (!r.terminated) + die("Fetching from responsive registry should not time-out."); + if (r.status != 0) + die("Dub fetch failed"); + + if (spawnProcess([dub, "remove", "gitcompatibledubpackage@1.0.4"]).wait != 0) + die("Dub remove failed"); + } + + log("Downloads should be retried when the zip is corrupted - gitcompatibledubpackage (1.0.3)"); + { + auto p = teeProcess([dub, "fetch", "gitcompatibledubpackage@1.0.3"] ~ registryArgs, + Redirect.stdout | Redirect.stderrToStdout); + scope(exit) p.pid.wait; + + Thread.sleep(timeoutDuration); + auto r = p.pid.tryWait; + if (!r.terminated) + die("Dub timed out unexpectedly"); + + const output = p.stdout; + auto needle = regex(`Failed to extract zip archive`); + auto matches = matchAll(output, needle); + if (matches.walkLength < 3) { + writeln("========== +Output was =========="); + writeln(output); + writeln("========== -Output was =========="); + die("Dub should have retried to download the zip archive multiple times."); + } + + if (execute([dub, "remove", "gitcompatibledubpackage", "--non-interactive"]).status == 0) { + die("Dub should not have installed a broken package"); + } + } + + log("HTTP status errors on downloads should be retried - gitcompatibledubpackage (1.0.2)"); + { + auto p = teeProcess([dub, "fetch", "gitcompatibledubpackage@1.0.2", "--vverbose"] ~ registryArgs, + Redirect.stdout | Redirect.stderrToStdout); + scope(exit) p.pid.wait; + + Thread.sleep(timeoutDuration); + auto r = p.pid.tryWait; + if (!r.terminated) + die("Dub timed out unexpectedly"); + + const output = p.stdout; + auto needle = regex(`Bad Gateway`); + auto matches = matchAll(output, needle); + if (matches.walkLength < 3) { + writeln("========== +Output was =========="); + writeln(output); + writeln("========== -Output was =========="); + die("Dub should have retried to download the zip archive multiple times."); + } + + if (execute([dub, "remove", "gitcompatibledubpackage", "--non-interactive"]).status == 0) { + die("Dub should not have installed a broken package"); + } + } + + version(Posix) { + log("HTTP status errors on downloads should retry with fallback mirror - gitcompatibledubpackage (1.0.2)"); + { + auto p = spawnProcess([ + dub, "fetch", "gitcompatibledubpackage@1.0.2", "--vverbose", + "--skip-registry=all", + format("--registry=http://localhost:%1$s http://localhost:%1$s/fallback", port), + ]); + scope(exit) p.wait; + + Thread.sleep(timeoutDuration); + auto r = p.tryWait; + if (!r.terminated) + die("Fetching from responsive registry should not time-out."); + if (r.status != 0) + die("Dub fetch should have succeeded"); + + if (spawnProcess([dub, "remove", "gitcompatibledubpackage@1.0.2"]).wait != 0) + die("Dub should have installed the package"); + } + } + + log("Test success"); +} + +immutable timeoutDuration = 1.seconds; diff --git a/test/new_tests/fetchzip/test.config b/test/new_tests/fetchzip/test.config new file mode 100644 index 0000000000..067843f6dc --- /dev/null +++ b/test/new_tests/fetchzip/test.config @@ -0,0 +1,3 @@ +locks = test_registry +# openssl failes to build with gdmd +dc_backend = [dmd, ldc] From 34ec142e7612c9397c965a635bac9873000d7ceb Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Fri, 18 Jul 2025 21:42:16 +0300 Subject: [PATCH 052/187] filesystem-version-with-buildinfo Signed-off-by: Andrei Horodniceanu --- test/filesystem-version-with-buildinfo.sh | 13 --------- .../.no_build | 0 .../.gitignore | 2 ++ .../dub.json | 9 +++++++ .../fs-json-dubpackage-1.0.7+build-9-9-9.zip | Bin .../source/app.d | 25 ++++++++++++++++++ 6 files changed, 36 insertions(+), 13 deletions(-) delete mode 100755 test/filesystem-version-with-buildinfo.sh delete mode 100644 test/filesystem-version-with-buildinfo/.no_build create mode 100644 test/new_tests/filesystem-version-with-buildinfo/.gitignore create mode 100644 test/new_tests/filesystem-version-with-buildinfo/dub.json rename test/{filesystem-version-with-buildinfo => new_tests/filesystem-version-with-buildinfo/file-registry}/fs-json-dubpackage-1.0.7+build-9-9-9.zip (100%) create mode 100644 test/new_tests/filesystem-version-with-buildinfo/source/app.d diff --git a/test/filesystem-version-with-buildinfo.sh b/test/filesystem-version-with-buildinfo.sh deleted file mode 100755 index a9e24b1904..0000000000 --- a/test/filesystem-version-with-buildinfo.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash -DIR=$(dirname "${BASH_SOURCE[0]}") - -. "$DIR"/common.sh - -${DUB} remove fs-json-dubpackage --non-interactive 2>/dev/null || true - -echo "Trying to get fs-json-dubpackage (1.0.7)" -${DUB} fetch fs-json-dubpackage@1.0.7 --skip-registry=all --registry=file://"$DIR"/filesystem-version-with-buildinfo - -if ! ${DUB} remove fs-json-dubpackage@1.0.7 2>/dev/null; then - die $LINENO 'DUB did not install package from file system.' -fi diff --git a/test/filesystem-version-with-buildinfo/.no_build b/test/filesystem-version-with-buildinfo/.no_build deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/new_tests/filesystem-version-with-buildinfo/.gitignore b/test/new_tests/filesystem-version-with-buildinfo/.gitignore new file mode 100644 index 0000000000..84af1f6848 --- /dev/null +++ b/test/new_tests/filesystem-version-with-buildinfo/.gitignore @@ -0,0 +1,2 @@ +!/file-registry +!/file-registry/* \ No newline at end of file diff --git a/test/new_tests/filesystem-version-with-buildinfo/dub.json b/test/new_tests/filesystem-version-with-buildinfo/dub.json new file mode 100644 index 0000000000..1f524b210d --- /dev/null +++ b/test/new_tests/filesystem-version-with-buildinfo/dub.json @@ -0,0 +1,9 @@ +{ + "name": "test-filesystem-version-with-buildinfo", + "targetType": "executable", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/filesystem-version-with-buildinfo/fs-json-dubpackage-1.0.7+build-9-9-9.zip b/test/new_tests/filesystem-version-with-buildinfo/file-registry/fs-json-dubpackage-1.0.7+build-9-9-9.zip similarity index 100% rename from test/filesystem-version-with-buildinfo/fs-json-dubpackage-1.0.7+build-9-9-9.zip rename to test/new_tests/filesystem-version-with-buildinfo/file-registry/fs-json-dubpackage-1.0.7+build-9-9-9.zip diff --git a/test/new_tests/filesystem-version-with-buildinfo/source/app.d b/test/new_tests/filesystem-version-with-buildinfo/source/app.d new file mode 100644 index 0000000000..d732b11938 --- /dev/null +++ b/test/new_tests/filesystem-version-with-buildinfo/source/app.d @@ -0,0 +1,25 @@ +import common; + +import std.process; +import std.file; +import std.path; + +void main () { + // Ignore errors + execute([dub, "remove", "fs-json-dubpackage", "--non-interactive"]); + + log("Trying to get fs-json-dubpackage (1.0.7)"); + { + auto p = spawnProcess( + [dub, "fetch", "fs-json-dubpackage@1.0.7", "--skip-registry=all", "--registry=file://" ~ getcwd.buildPath("file-registry")] + ); + if (p.wait != 0) + die("Dub fetch failed"); + } + + { + auto p = execute([dub, "remove", "fs-json-dubpackage@1.0.7"]); + if (p.status != 0) + die("Dub did not install package from file system."); + } +} From 876842758efead174230d97b70a622abe66ddd87 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Fri, 18 Jul 2025 21:47:40 +0300 Subject: [PATCH 053/187] frameworks Signed-off-by: Andrei Horodniceanu --- test/frameworks.sh | 10 ---------- test/frameworks/.no_build | 0 test/frameworks/.no_run | 0 test/{ => new_tests}/frameworks/dub.sdl | 0 test/{ => new_tests}/frameworks/source/app.d | 0 test/new_tests/frameworks/test.config | 2 ++ 6 files changed, 2 insertions(+), 10 deletions(-) delete mode 100755 test/frameworks.sh delete mode 100644 test/frameworks/.no_build delete mode 100644 test/frameworks/.no_run rename test/{ => new_tests}/frameworks/dub.sdl (100%) rename test/{ => new_tests}/frameworks/source/app.d (100%) create mode 100644 test/new_tests/frameworks/test.config diff --git a/test/frameworks.sh b/test/frameworks.sh deleted file mode 100755 index 589d4abb85..0000000000 --- a/test/frameworks.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash -if [[ "$OSTYPE" == "darwin"* ]]; then - . $(dirname "${BASH_SOURCE[0]}")/common.sh - - cd ${CURR_DIR}/frameworks - rm -rf .dub - rm -rf out/ - - ${DUB} build -fi \ No newline at end of file diff --git a/test/frameworks/.no_build b/test/frameworks/.no_build deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/frameworks/.no_run b/test/frameworks/.no_run deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/frameworks/dub.sdl b/test/new_tests/frameworks/dub.sdl similarity index 100% rename from test/frameworks/dub.sdl rename to test/new_tests/frameworks/dub.sdl diff --git a/test/frameworks/source/app.d b/test/new_tests/frameworks/source/app.d similarity index 100% rename from test/frameworks/source/app.d rename to test/new_tests/frameworks/source/app.d diff --git a/test/new_tests/frameworks/test.config b/test/new_tests/frameworks/test.config new file mode 100644 index 0000000000..0d3463eab3 --- /dev/null +++ b/test/new_tests/frameworks/test.config @@ -0,0 +1,2 @@ +os = osx +dub_command = build From 583d3ed26c2e5d5d2077a1094beaf6025e64057a Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Fri, 18 Jul 2025 22:00:51 +0300 Subject: [PATCH 054/187] frameworks - set targeType to executable in order to invoke the linker Signed-off-by: Andrei Horodniceanu --- test/new_tests/frameworks/dub.sdl | 1 + 1 file changed, 1 insertion(+) diff --git a/test/new_tests/frameworks/dub.sdl b/test/new_tests/frameworks/dub.sdl index ca38cc035d..7ae7ff83b5 100644 --- a/test/new_tests/frameworks/dub.sdl +++ b/test/new_tests/frameworks/dub.sdl @@ -5,6 +5,7 @@ configuration "osx" { platforms "osx" frameworks "Foundation" + targetType "executable" } configuration "other" { From afb915e0bc401caa2e3288f804d860ed8489d5fa Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Fri, 18 Jul 2025 22:02:30 +0300 Subject: [PATCH 055/187] git-dependency Signed-off-by: Andrei Horodniceanu --- test/new_tests/git-dependency/.gitignore | 1 + test/{ => new_tests}/git-dependency/dub.json | 0 test/{ => new_tests}/git-dependency/src/app.d | 0 3 files changed, 1 insertion(+) create mode 100644 test/new_tests/git-dependency/.gitignore rename test/{ => new_tests}/git-dependency/dub.json (100%) rename test/{ => new_tests}/git-dependency/src/app.d (100%) diff --git a/test/new_tests/git-dependency/.gitignore b/test/new_tests/git-dependency/.gitignore new file mode 100644 index 0000000000..384434d079 --- /dev/null +++ b/test/new_tests/git-dependency/.gitignore @@ -0,0 +1 @@ +!/src/ \ No newline at end of file diff --git a/test/git-dependency/dub.json b/test/new_tests/git-dependency/dub.json similarity index 100% rename from test/git-dependency/dub.json rename to test/new_tests/git-dependency/dub.json diff --git a/test/git-dependency/src/app.d b/test/new_tests/git-dependency/src/app.d similarity index 100% rename from test/git-dependency/src/app.d rename to test/new_tests/git-dependency/src/app.d From 111b084f0209b4395c4939e2b34aae35859596d5 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Fri, 18 Jul 2025 22:15:38 +0300 Subject: [PATCH 056/187] help Signed-off-by: Andrei Horodniceanu --- test/help.sh | 25 ----------------- test/new_tests/help/dub.json | 9 ++++++ test/new_tests/help/source/app.d | 48 ++++++++++++++++++++++++++++++++ 3 files changed, 57 insertions(+), 25 deletions(-) delete mode 100755 test/help.sh create mode 100644 test/new_tests/help/dub.json create mode 100644 test/new_tests/help/source/app.d diff --git a/test/help.sh b/test/help.sh deleted file mode 100755 index 8d56f790e5..0000000000 --- a/test/help.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env bash - -. $(dirname "${BASH_SOURCE[0]}")/common.sh - -### It shows the general help message -if ! { ${DUB} help | grep "Manages the DUB project in the current directory."; } then - die $LINENO 'DUB did not print the default help message, with the `help` command.' -fi - -if ! { ${DUB} -h | grep "Manages the DUB project in the current directory."; } then - die $LINENO 'DUB did not print the default help message, with the `-h` argument.' -fi - -if ! { ${DUB} --help | grep "Manages the DUB project in the current directory."; } then - die $LINENO 'DUB did not print the default help message, with the `--help` argument.' -fi - -### It shows the build command help -if ! { ${DUB} build -h | grep "Builds a package"; } then - die $LINENO 'DUB did not print the build help message, with the `-h` argument.' -fi - -if ! { ${DUB} build --help | grep "Builds a package"; } then - die $LINENO 'DUB did not print the build help message, with the `--help` argument.' -fi diff --git a/test/new_tests/help/dub.json b/test/new_tests/help/dub.json new file mode 100644 index 0000000000..ade74597c1 --- /dev/null +++ b/test/new_tests/help/dub.json @@ -0,0 +1,9 @@ +{ + "name": "test-help", + "targetType": "executable", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/new_tests/help/source/app.d b/test/new_tests/help/source/app.d new file mode 100644 index 0000000000..13f0e90336 --- /dev/null +++ b/test/new_tests/help/source/app.d @@ -0,0 +1,48 @@ +import common; + +import std.process; +import std.file; +import std.path; +import std.stdio; + +void main () { + // It shows the general help message + runTestCase( + ["help"], + "Manages the DUB project in the current directory.", + "DUB did not print the default help message, with the `help` command.", + ); + + runTestCase( + ["-h"], + "Manages the DUB project in the current directory.", + "DUB did not print the default help message, with the `-h` argument.", + ); + runTestCase( + ["--help"], + "Manages the DUB project in the current directory.", + "DUB did not print the default help message, with the `--help` argument.", + ); + + // It shows the build command help + runTestCase( + ["build", "-h"], + "Builds a package", + "DUB did not print the build help message, with the `-h` argument.", + ); + runTestCase( + ["build", "--help"], + "Builds a package", + "DUB did not print the build help message, with the `--help` argument.", + ); +} + +void runTestCase(string[] args, string needle, string error) { + auto p = execute(dub ~ args); + if (p.status != 0) + die("Dub failed to run"); + + import std.algorithm.searching; + if (!p.output.canFind(needle)) + die(error); +} From cfefaf84c07fad2be2253560d570e841a0b46e08 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Fri, 18 Jul 2025 22:18:07 +0300 Subject: [PATCH 057/187] ignore-hidden-1 Signed-off-by: Andrei Horodniceanu --- test/ignore-hidden-1/.gitignore | 5 ----- test/ignore-hidden-1/.no_run | 0 test/ignore-hidden-1/.no_test | 0 test/new_tests/ignore-hidden-1/.gitignore | 1 + test/{ => new_tests}/ignore-hidden-1/dub.json | 0 test/{ => new_tests}/ignore-hidden-1/source/.hidden.d | 0 test/{ => new_tests}/ignore-hidden-1/source/app.d | 0 test/new_tests/ignore-hidden-1/test.config | 1 + 8 files changed, 2 insertions(+), 5 deletions(-) delete mode 100644 test/ignore-hidden-1/.gitignore delete mode 100644 test/ignore-hidden-1/.no_run delete mode 100644 test/ignore-hidden-1/.no_test create mode 100644 test/new_tests/ignore-hidden-1/.gitignore rename test/{ => new_tests}/ignore-hidden-1/dub.json (100%) rename test/{ => new_tests}/ignore-hidden-1/source/.hidden.d (100%) rename test/{ => new_tests}/ignore-hidden-1/source/app.d (100%) create mode 100644 test/new_tests/ignore-hidden-1/test.config diff --git a/test/ignore-hidden-1/.gitignore b/test/ignore-hidden-1/.gitignore deleted file mode 100644 index 433d26664a..0000000000 --- a/test/ignore-hidden-1/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -.dub -docs.json -__dummy.html -*.o -*.obj diff --git a/test/ignore-hidden-1/.no_run b/test/ignore-hidden-1/.no_run deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/ignore-hidden-1/.no_test b/test/ignore-hidden-1/.no_test deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/new_tests/ignore-hidden-1/.gitignore b/test/new_tests/ignore-hidden-1/.gitignore new file mode 100644 index 0000000000..7c3ddf2665 --- /dev/null +++ b/test/new_tests/ignore-hidden-1/.gitignore @@ -0,0 +1 @@ +!/source/.hidden.d diff --git a/test/ignore-hidden-1/dub.json b/test/new_tests/ignore-hidden-1/dub.json similarity index 100% rename from test/ignore-hidden-1/dub.json rename to test/new_tests/ignore-hidden-1/dub.json diff --git a/test/ignore-hidden-1/source/.hidden.d b/test/new_tests/ignore-hidden-1/source/.hidden.d similarity index 100% rename from test/ignore-hidden-1/source/.hidden.d rename to test/new_tests/ignore-hidden-1/source/.hidden.d diff --git a/test/ignore-hidden-1/source/app.d b/test/new_tests/ignore-hidden-1/source/app.d similarity index 100% rename from test/ignore-hidden-1/source/app.d rename to test/new_tests/ignore-hidden-1/source/app.d diff --git a/test/new_tests/ignore-hidden-1/test.config b/test/new_tests/ignore-hidden-1/test.config new file mode 100644 index 0000000000..32efffa32d --- /dev/null +++ b/test/new_tests/ignore-hidden-1/test.config @@ -0,0 +1 @@ +dub_command = build From 2f7adbca4a62d398b05b58585081979ca7d7359d Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Fri, 18 Jul 2025 22:19:43 +0300 Subject: [PATCH 058/187] ignore-hidden-2 Signed-off-by: Andrei Horodniceanu --- test/ignore-hidden-2/.gitignore | 5 ----- test/ignore-hidden-2/.no_run | 0 test/ignore-hidden-2/.no_test | 0 test/new_tests/ignore-hidden-2/.gitignore | 1 + test/{ => new_tests}/ignore-hidden-2/dub.json | 0 test/{ => new_tests}/ignore-hidden-2/source/.hidden.d | 0 test/{ => new_tests}/ignore-hidden-2/source/app.d | 0 test/new_tests/ignore-hidden-2/test.config | 1 + 8 files changed, 2 insertions(+), 5 deletions(-) delete mode 100644 test/ignore-hidden-2/.gitignore delete mode 100644 test/ignore-hidden-2/.no_run delete mode 100644 test/ignore-hidden-2/.no_test create mode 100644 test/new_tests/ignore-hidden-2/.gitignore rename test/{ => new_tests}/ignore-hidden-2/dub.json (100%) rename test/{ => new_tests}/ignore-hidden-2/source/.hidden.d (100%) rename test/{ => new_tests}/ignore-hidden-2/source/app.d (100%) create mode 100644 test/new_tests/ignore-hidden-2/test.config diff --git a/test/ignore-hidden-2/.gitignore b/test/ignore-hidden-2/.gitignore deleted file mode 100644 index 433d26664a..0000000000 --- a/test/ignore-hidden-2/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -.dub -docs.json -__dummy.html -*.o -*.obj diff --git a/test/ignore-hidden-2/.no_run b/test/ignore-hidden-2/.no_run deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/ignore-hidden-2/.no_test b/test/ignore-hidden-2/.no_test deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/new_tests/ignore-hidden-2/.gitignore b/test/new_tests/ignore-hidden-2/.gitignore new file mode 100644 index 0000000000..7c3ddf2665 --- /dev/null +++ b/test/new_tests/ignore-hidden-2/.gitignore @@ -0,0 +1 @@ +!/source/.hidden.d diff --git a/test/ignore-hidden-2/dub.json b/test/new_tests/ignore-hidden-2/dub.json similarity index 100% rename from test/ignore-hidden-2/dub.json rename to test/new_tests/ignore-hidden-2/dub.json diff --git a/test/ignore-hidden-2/source/.hidden.d b/test/new_tests/ignore-hidden-2/source/.hidden.d similarity index 100% rename from test/ignore-hidden-2/source/.hidden.d rename to test/new_tests/ignore-hidden-2/source/.hidden.d diff --git a/test/ignore-hidden-2/source/app.d b/test/new_tests/ignore-hidden-2/source/app.d similarity index 100% rename from test/ignore-hidden-2/source/app.d rename to test/new_tests/ignore-hidden-2/source/app.d diff --git a/test/new_tests/ignore-hidden-2/test.config b/test/new_tests/ignore-hidden-2/test.config new file mode 100644 index 0000000000..32efffa32d --- /dev/null +++ b/test/new_tests/ignore-hidden-2/test.config @@ -0,0 +1 @@ +dub_command = build From 4453ddf50f7ed7876137acabc726ea8750834c87 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Fri, 18 Jul 2025 22:25:56 +0300 Subject: [PATCH 059/187] ignore-useless-arch-switch Signed-off-by: Andrei Horodniceanu --- test/ignore-useless-arch-switch/.no_test | 0 test/ignore-useless-arch-switch/source/app.d | 40 ------------------- .../ignore-useless-arch-switch/dub.sdl | 1 + .../ignore-useless-arch-switch/source/app.d | 35 ++++++++++++++++ 4 files changed, 36 insertions(+), 40 deletions(-) delete mode 100644 test/ignore-useless-arch-switch/.no_test delete mode 100644 test/ignore-useless-arch-switch/source/app.d rename test/{ => new_tests}/ignore-useless-arch-switch/dub.sdl (61%) create mode 100644 test/new_tests/ignore-useless-arch-switch/source/app.d diff --git a/test/ignore-useless-arch-switch/.no_test b/test/ignore-useless-arch-switch/.no_test deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/ignore-useless-arch-switch/source/app.d b/test/ignore-useless-arch-switch/source/app.d deleted file mode 100644 index b48449c7db..0000000000 --- a/test/ignore-useless-arch-switch/source/app.d +++ /dev/null @@ -1,40 +0,0 @@ -import std.json; -import std.path; -import std.process; -import std.stdio; - -string getCacheFile (in string[] program) { - auto p = execute(program); - with (p) { - if (status != 0) { - assert(false, "Failed to invoke dub describe: " ~ output); - } - return output.parseJSON["targets"][0]["cacheArtifactPath"].str; - } -} - -void main() -{ - version (X86_64) - string archArg = "x86_64"; - else version (X86) - string archArg = "x86"; - else { - string archArg; - writeln("Skipping because of unsupported architecture"); - return; - } - - const describeProgram = [ - environment["DUB"], - "describe", - "--compiler=" ~ environment["DC"], - "--root=" ~ __FILE_FULL_PATH__.dirName.dirName, - ]; - immutable plainCacheFile = describeProgram.getCacheFile; - - const describeWithArch = describeProgram ~ [ "--arch=" ~ archArg ]; - immutable archCacheFile = describeWithArch.getCacheFile; - - assert(plainCacheFile == archCacheFile, "--arch shouldn't have modified the cache file"); -} diff --git a/test/ignore-useless-arch-switch/dub.sdl b/test/new_tests/ignore-useless-arch-switch/dub.sdl similarity index 61% rename from test/ignore-useless-arch-switch/dub.sdl rename to test/new_tests/ignore-useless-arch-switch/dub.sdl index 919a41f950..48a53c70e8 100644 --- a/test/ignore-useless-arch-switch/dub.sdl +++ b/test/new_tests/ignore-useless-arch-switch/dub.sdl @@ -1,2 +1,3 @@ name "ignore-useless-arch-switch" targetType "executable" +dependency "common" path="../common" diff --git a/test/new_tests/ignore-useless-arch-switch/source/app.d b/test/new_tests/ignore-useless-arch-switch/source/app.d new file mode 100644 index 0000000000..08f7d466f3 --- /dev/null +++ b/test/new_tests/ignore-useless-arch-switch/source/app.d @@ -0,0 +1,35 @@ +import common; + +import std.json; +import std.path; +import std.process; + +string getCacheFile (in string[] args) { + auto p = execute([dub, "describe"] ~ args); + with (p) { + if (status != 0) { + log("dub describe failed. Output:"); + log(output); + die("Failed to invoke dub describe"); + } + return output.parseJSON["targets"][0]["cacheArtifactPath"].str; + } +} + +void main() +{ + version (X86_64) + string archArg = "x86_64"; + else version (X86) + string archArg = "x86"; + else { + string archArg; + skip("Unsupported architecture"); + } + + immutable plainCacheFile = getCacheFile([]); + immutable archCacheFile = getCacheFile(["--arch=" ~ archArg]); + + if (plainCacheFile != archCacheFile) + die("--arch shouldn't have modified the cache file"); +} From 435caa6d28adae360bf89b0b0d29dc128f531318 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Fri, 18 Jul 2025 22:29:53 +0300 Subject: [PATCH 060/187] injected-from-dependency Signed-off-by: Andrei Horodniceanu --- test/injected-from-dependency/.no_test | 0 test/new_tests/injected-from-dependency/.gitignore | 2 ++ test/{ => new_tests}/injected-from-dependency/ahook.d | 0 test/{ => new_tests}/injected-from-dependency/dub.json | 0 test/{ => new_tests}/injected-from-dependency/source/entry.d | 0 test/{ => new_tests}/injected-from-dependency/toload/vars.d | 0 6 files changed, 2 insertions(+) delete mode 100644 test/injected-from-dependency/.no_test create mode 100644 test/new_tests/injected-from-dependency/.gitignore rename test/{ => new_tests}/injected-from-dependency/ahook.d (100%) rename test/{ => new_tests}/injected-from-dependency/dub.json (100%) rename test/{ => new_tests}/injected-from-dependency/source/entry.d (100%) rename test/{ => new_tests}/injected-from-dependency/toload/vars.d (100%) diff --git a/test/injected-from-dependency/.no_test b/test/injected-from-dependency/.no_test deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/new_tests/injected-from-dependency/.gitignore b/test/new_tests/injected-from-dependency/.gitignore new file mode 100644 index 0000000000..e28c6574a7 --- /dev/null +++ b/test/new_tests/injected-from-dependency/.gitignore @@ -0,0 +1,2 @@ +!/*.d +!/toload/ diff --git a/test/injected-from-dependency/ahook.d b/test/new_tests/injected-from-dependency/ahook.d similarity index 100% rename from test/injected-from-dependency/ahook.d rename to test/new_tests/injected-from-dependency/ahook.d diff --git a/test/injected-from-dependency/dub.json b/test/new_tests/injected-from-dependency/dub.json similarity index 100% rename from test/injected-from-dependency/dub.json rename to test/new_tests/injected-from-dependency/dub.json diff --git a/test/injected-from-dependency/source/entry.d b/test/new_tests/injected-from-dependency/source/entry.d similarity index 100% rename from test/injected-from-dependency/source/entry.d rename to test/new_tests/injected-from-dependency/source/entry.d diff --git a/test/injected-from-dependency/toload/vars.d b/test/new_tests/injected-from-dependency/toload/vars.d similarity index 100% rename from test/injected-from-dependency/toload/vars.d rename to test/new_tests/injected-from-dependency/toload/vars.d From 1842af0f242e59b92c90648c6f68d2c8ea7f6911 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 19 Jul 2025 11:53:44 +0300 Subject: [PATCH 061/187] interactive-remove Signed-off-by: Andrei Horodniceanu --- test/interactive-remove.sh | 42 -------- test/new_tests/interactive-remove/dub.json | 8 ++ .../new_tests/interactive-remove/source/app.d | 98 +++++++++++++++++++ 3 files changed, 106 insertions(+), 42 deletions(-) delete mode 100755 test/interactive-remove.sh create mode 100644 test/new_tests/interactive-remove/dub.json create mode 100644 test/new_tests/interactive-remove/source/app.d diff --git a/test/interactive-remove.sh b/test/interactive-remove.sh deleted file mode 100755 index dfe1a9431c..0000000000 --- a/test/interactive-remove.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env bash - -. $(dirname "${BASH_SOURCE[0]}")/common.sh - -# This test messes with the user's package directory -# Hence it's a pretty bad test, but we need it. -# Ideally, we should not have this run by default / run it in a container. -# In the meantime, in order to make it pass on developer's machines, -# we need to nuke every `dub` version in the user cache... -$DUB remove dub -n || true -DUBPKGPATH=${DPATH+"$DPATH/dub/packages/dub"} -DUBPKGPATH=${DUBPKGPATH:-"$HOME/.dub/packages/dub"} - -$DUB fetch dub@1.9.0 && [ -d $DUBPKGPATH/1.9.0/dub ] -$DUB fetch dub@1.10.0 && [ -d $DUBPKGPATH/1.10.0/dub ] - -echo 1 | $DUB remove dub | tr -d '\n' | grep --ignore-case 'select.*1\.9\.0.*1\.10\.0.*' -if [ -d $DUBPKGPATH/1.9.0/dub ]; then - die $LINENO 'Failed to remove dub-1.9.0' -fi - -$DUB fetch dub@1.9.0 && [ -d $DUBPKGPATH/1.9.0/dub ] -# EOF aborts remove -echo -xn '' | $DUB remove dub -if [ ! -d $DUBPKGPATH/1.9.0/dub ] || [ ! -d $DUBPKGPATH/1.10.0/dub ]; then - die $LINENO 'Aborted dub still removed a package' -fi - -# validates input -echo -e 'abc\n4\n-1\n3' | $DUB remove dub -if [ -d $DUBPKGPATH/1.9.0/dub ] || [ -d $DUBPKGPATH/1.10.0/dub ]; then - die $LINENO 'Failed to remove all version of dub' -fi - -$DUB fetch dub@1.9.0 && [ -d $DUBPKGPATH/1.9.0/dub ] -$DUB fetch dub@1.10.0 && [ -d $DUBPKGPATH/1.10.0/dub ] -# is non-interactive with a -$DUB remove dub@1.9.0 -$DUB remove dub@1.10.0 -if [ -d $DUBPKGPATH/1.9.0/dub ] || [ -d $DUBPKGPATH/1.10.0/dub ]; then - die $LINENO 'Failed to non-interactively remove specified versions' -fi diff --git a/test/new_tests/interactive-remove/dub.json b/test/new_tests/interactive-remove/dub.json new file mode 100644 index 0000000000..32b7ad72d9 --- /dev/null +++ b/test/new_tests/interactive-remove/dub.json @@ -0,0 +1,8 @@ +{ + "name": "test-interactive-remove", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/new_tests/interactive-remove/source/app.d b/test/new_tests/interactive-remove/source/app.d new file mode 100644 index 0000000000..bc779dea70 --- /dev/null +++ b/test/new_tests/interactive-remove/source/app.d @@ -0,0 +1,98 @@ +import common; + +import std.array; +import std.algorithm; +import std.file; +import std.path; +import std.process; +import std.regex; +import std.string; +import std.stdio; + +string pkgDir; + +void main () { + pkgDir = dubHome.buildPath("packages", "dub"); + + // Nuke existing dir + if (dubHome.exists) dubHome.rmdirRecurse(); + + fetchDub("1.9.0"); + fetchDub("1.10.0"); + + { + auto p = pipeProcess([dub, "remove", "dub"]); + scope(exit) p.pid.wait; + p.stdin.writeln(1); + p.stdin.close(); + + const output = p.stdout.byLineCopy.join('\n'); + p.pid.wait; + + auto r = regex(`select.*1\.9\.0.*1\.10\.0`, "is"); + if (!output.matchFirst(r)) { + writeln("Dub didn't print the menu correctly. Output:"); + writeln(output); + die("unrecognized dub remove dialog"); + } + + if (existsDubDir("1.9.0")) + die("Failed to remove dub-1.9.0"); + } + + { + fetchDub("1.9.0"); + + // EOF abort remove + auto p = pipeProcess([dub, "remove", "dub"], Redirect.stdin); + scope(exit) p.pid.wait; + p.stdin.close(); + p.pid.wait; + + if (!existsDubDir("1.9.0") || !existsDubDir("1.10.0")) + die("Aborted dub still removed a package"); + } + + { + // validate input + auto p = pipeProcess([dub, "remove", "dub"], Redirect.stdin); + scope(exit) p.pid.wait; + p.stdin.writeln("abc"); + p.stdin.writeln("4"); + p.stdin.writeln("-1"); + p.stdin.write("3"); + p.stdin.close(); + p.pid.wait; + + if (existsDubDir("1.9.0") || existsDubDir("1.10.0")) + die("Failed to remove all version of dub"); + } + + fetchDub("1.9.0"); + fetchDub("1.10.0"); + { + // is non-interactive with a + foreach (ver; ["1.9.0", "1.10.0"]) + if (spawnProcess([dub, "remove", "dub@" ~ ver]).wait != 0) + die("Dub failed to remove version ", ver); + + foreach (ver; ["1.9.0", "1.10.0"]) + if (existsDubDir(ver)) + die("Failed to non-interactively remove specified versions"); + } +} + +bool existsDubDir(const(char)[] ver) { + immutable path = pkgDir.buildPath(ver, "dub"); + return path.exists && path.isDir; +} + +void fetchDub(string dubVer) { + if (spawnProcess([dub, "fetch", "dub@" ~ dubVer]).wait != 0) + die("Dub fetch failed"); + + if (!existsDubDir(dubVer)) { + writeln(pkgDir.buildPath(dubVer, "dub")); + die("Dub did not create the expected ", dubVer, " dir"); + } +} From 6f25f446433c936f0467ab4549cae2175ad963a2 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 19 Jul 2025 11:55:00 +0300 Subject: [PATCH 062/187] issue1003-check-empty-ld-flags Signed-off-by: Andrei Horodniceanu --- test/issue1003-check-empty-ld-flags.sh | 7 ------- .../issue1003-check-empty-ld-flags/dub.json | 0 .../issue1003-check-empty-ld-flags/source/app.d | 0 test/new_tests/issue1003-check-empty-ld-flags/test.config | 1 + 4 files changed, 1 insertion(+), 7 deletions(-) delete mode 100755 test/issue1003-check-empty-ld-flags.sh rename test/{ => new_tests}/issue1003-check-empty-ld-flags/dub.json (100%) rename test/{ => new_tests}/issue1003-check-empty-ld-flags/source/app.d (100%) create mode 100644 test/new_tests/issue1003-check-empty-ld-flags/test.config diff --git a/test/issue1003-check-empty-ld-flags.sh b/test/issue1003-check-empty-ld-flags.sh deleted file mode 100755 index 61678f720b..0000000000 --- a/test/issue1003-check-empty-ld-flags.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash - -. $(dirname "${BASH_SOURCE[0]}")/common.sh - -cd ${CURR_DIR}/issue1003-check-empty-ld-flags - -${DUB} build --compiler=${DC} --force diff --git a/test/issue1003-check-empty-ld-flags/dub.json b/test/new_tests/issue1003-check-empty-ld-flags/dub.json similarity index 100% rename from test/issue1003-check-empty-ld-flags/dub.json rename to test/new_tests/issue1003-check-empty-ld-flags/dub.json diff --git a/test/issue1003-check-empty-ld-flags/source/app.d b/test/new_tests/issue1003-check-empty-ld-flags/source/app.d similarity index 100% rename from test/issue1003-check-empty-ld-flags/source/app.d rename to test/new_tests/issue1003-check-empty-ld-flags/source/app.d diff --git a/test/new_tests/issue1003-check-empty-ld-flags/test.config b/test/new_tests/issue1003-check-empty-ld-flags/test.config new file mode 100644 index 0000000000..32efffa32d --- /dev/null +++ b/test/new_tests/issue1003-check-empty-ld-flags/test.config @@ -0,0 +1 @@ +dub_command = build From 622d2c320c99a6f3a69e4c587bd6d2d602129f74 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 19 Jul 2025 12:02:26 +0300 Subject: [PATCH 063/187] issue1004-override-config Signed-off-by: Andrei Horodniceanu --- test/issue1004-override-config.sh | 5 ----- test/issue1004-override-config/.no_build | 0 test/new_tests/issue1004-override-config/.gitignore | 8 ++++++++ test/new_tests/issue1004-override-config/dub.json | 8 ++++++++ .../issue1004-override-config/sample}/a/a.d | 0 .../issue1004-override-config/sample}/a/dub.sdl | 0 .../issue1004-override-config/sample}/main/dub.sdl | 0 .../sample}/main/source/main.d | 0 test/new_tests/issue1004-override-config/source/app.d | 11 +++++++++++ 9 files changed, 27 insertions(+), 5 deletions(-) delete mode 100755 test/issue1004-override-config.sh delete mode 100644 test/issue1004-override-config/.no_build create mode 100644 test/new_tests/issue1004-override-config/.gitignore create mode 100644 test/new_tests/issue1004-override-config/dub.json rename test/{issue1004-override-config => new_tests/issue1004-override-config/sample}/a/a.d (100%) rename test/{issue1004-override-config => new_tests/issue1004-override-config/sample}/a/dub.sdl (100%) rename test/{issue1004-override-config => new_tests/issue1004-override-config/sample}/main/dub.sdl (100%) rename test/{issue1004-override-config => new_tests/issue1004-override-config/sample}/main/source/main.d (100%) create mode 100644 test/new_tests/issue1004-override-config/source/app.d diff --git a/test/issue1004-override-config.sh b/test/issue1004-override-config.sh deleted file mode 100755 index 96080f18b3..0000000000 --- a/test/issue1004-override-config.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash - -. $(dirname "${BASH_SOURCE[0]}")/common.sh -cd ${CURR_DIR}/issue1004-override-config -${DUB} build --bare main --override-config a/success diff --git a/test/issue1004-override-config/.no_build b/test/issue1004-override-config/.no_build deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/new_tests/issue1004-override-config/.gitignore b/test/new_tests/issue1004-override-config/.gitignore new file mode 100644 index 0000000000..290ddbb4d6 --- /dev/null +++ b/test/new_tests/issue1004-override-config/.gitignore @@ -0,0 +1,8 @@ +/sample/** +!/sample/ +!/sample/a/ +!/sample/a/a.d +!/sample/a/dub.sdl +!/sample/main/ +!/sample/main/source/main.d +!/sample/main/dub.sdl diff --git a/test/new_tests/issue1004-override-config/dub.json b/test/new_tests/issue1004-override-config/dub.json new file mode 100644 index 0000000000..8d8dbbb067 --- /dev/null +++ b/test/new_tests/issue1004-override-config/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue1004-override-config", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/issue1004-override-config/a/a.d b/test/new_tests/issue1004-override-config/sample/a/a.d similarity index 100% rename from test/issue1004-override-config/a/a.d rename to test/new_tests/issue1004-override-config/sample/a/a.d diff --git a/test/issue1004-override-config/a/dub.sdl b/test/new_tests/issue1004-override-config/sample/a/dub.sdl similarity index 100% rename from test/issue1004-override-config/a/dub.sdl rename to test/new_tests/issue1004-override-config/sample/a/dub.sdl diff --git a/test/issue1004-override-config/main/dub.sdl b/test/new_tests/issue1004-override-config/sample/main/dub.sdl similarity index 100% rename from test/issue1004-override-config/main/dub.sdl rename to test/new_tests/issue1004-override-config/sample/main/dub.sdl diff --git a/test/issue1004-override-config/main/source/main.d b/test/new_tests/issue1004-override-config/sample/main/source/main.d similarity index 100% rename from test/issue1004-override-config/main/source/main.d rename to test/new_tests/issue1004-override-config/sample/main/source/main.d diff --git a/test/new_tests/issue1004-override-config/source/app.d b/test/new_tests/issue1004-override-config/source/app.d new file mode 100644 index 0000000000..0363667bb6 --- /dev/null +++ b/test/new_tests/issue1004-override-config/source/app.d @@ -0,0 +1,11 @@ +import common; + +import std.process; + +void main () { + auto p = spawnProcess( + [dub, "build", "--bare", "main", "--override-config", "a/success"], null, Config.none, "sample"); + + if (p.wait != 0) + die("Dub build failed"); +} From 625af2a86c96bcc5d1a346d7318d4456518f2ab7 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 19 Jul 2025 12:07:48 +0300 Subject: [PATCH 064/187] issue1005-configuration-resolution Signed-off-by: Andrei Horodniceanu --- test/issue1005-configuration-resolution.sh | 5 ----- test/issue1005-configuration-resolution/.no_build | 0 .../issue1005-configuration-resolution/.gitignore | 6 ++++++ .../issue1005-configuration-resolution/dub.json | 8 ++++++++ .../sample}/a/dub.sdl | 0 .../sample}/b/dub.sdl | 0 .../sample}/b/source/b.d | 0 .../sample}/c/dub.sdl | 0 .../sample}/main/dub.sdl | 0 .../sample}/main/source/app.d | 0 .../issue1005-configuration-resolution/source/app.d | 11 +++++++++++ 11 files changed, 25 insertions(+), 5 deletions(-) delete mode 100755 test/issue1005-configuration-resolution.sh delete mode 100644 test/issue1005-configuration-resolution/.no_build create mode 100644 test/new_tests/issue1005-configuration-resolution/.gitignore create mode 100644 test/new_tests/issue1005-configuration-resolution/dub.json rename test/{issue1005-configuration-resolution => new_tests/issue1005-configuration-resolution/sample}/a/dub.sdl (100%) rename test/{issue1005-configuration-resolution => new_tests/issue1005-configuration-resolution/sample}/b/dub.sdl (100%) rename test/{issue1005-configuration-resolution => new_tests/issue1005-configuration-resolution/sample}/b/source/b.d (100%) rename test/{issue1005-configuration-resolution => new_tests/issue1005-configuration-resolution/sample}/c/dub.sdl (100%) rename test/{issue1005-configuration-resolution => new_tests/issue1005-configuration-resolution/sample}/main/dub.sdl (100%) rename test/{issue1005-configuration-resolution => new_tests/issue1005-configuration-resolution/sample}/main/source/app.d (100%) create mode 100644 test/new_tests/issue1005-configuration-resolution/source/app.d diff --git a/test/issue1005-configuration-resolution.sh b/test/issue1005-configuration-resolution.sh deleted file mode 100755 index 1233e76df2..0000000000 --- a/test/issue1005-configuration-resolution.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash - -. $(dirname "${BASH_SOURCE[0]}")/common.sh -cd ${CURR_DIR}/issue1005-configuration-resolution -${DUB} build --bare main diff --git a/test/issue1005-configuration-resolution/.no_build b/test/issue1005-configuration-resolution/.no_build deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/new_tests/issue1005-configuration-resolution/.gitignore b/test/new_tests/issue1005-configuration-resolution/.gitignore new file mode 100644 index 0000000000..30c3d35390 --- /dev/null +++ b/test/new_tests/issue1005-configuration-resolution/.gitignore @@ -0,0 +1,6 @@ +/sample/** +!/sample/ +!/sample/*/ +!/sample/*/dub.sdl +!/sample/*/source/ +!/sample/*/source/* diff --git a/test/new_tests/issue1005-configuration-resolution/dub.json b/test/new_tests/issue1005-configuration-resolution/dub.json new file mode 100644 index 0000000000..d89beb2462 --- /dev/null +++ b/test/new_tests/issue1005-configuration-resolution/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue1005-configuration-resolution", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/issue1005-configuration-resolution/a/dub.sdl b/test/new_tests/issue1005-configuration-resolution/sample/a/dub.sdl similarity index 100% rename from test/issue1005-configuration-resolution/a/dub.sdl rename to test/new_tests/issue1005-configuration-resolution/sample/a/dub.sdl diff --git a/test/issue1005-configuration-resolution/b/dub.sdl b/test/new_tests/issue1005-configuration-resolution/sample/b/dub.sdl similarity index 100% rename from test/issue1005-configuration-resolution/b/dub.sdl rename to test/new_tests/issue1005-configuration-resolution/sample/b/dub.sdl diff --git a/test/issue1005-configuration-resolution/b/source/b.d b/test/new_tests/issue1005-configuration-resolution/sample/b/source/b.d similarity index 100% rename from test/issue1005-configuration-resolution/b/source/b.d rename to test/new_tests/issue1005-configuration-resolution/sample/b/source/b.d diff --git a/test/issue1005-configuration-resolution/c/dub.sdl b/test/new_tests/issue1005-configuration-resolution/sample/c/dub.sdl similarity index 100% rename from test/issue1005-configuration-resolution/c/dub.sdl rename to test/new_tests/issue1005-configuration-resolution/sample/c/dub.sdl diff --git a/test/issue1005-configuration-resolution/main/dub.sdl b/test/new_tests/issue1005-configuration-resolution/sample/main/dub.sdl similarity index 100% rename from test/issue1005-configuration-resolution/main/dub.sdl rename to test/new_tests/issue1005-configuration-resolution/sample/main/dub.sdl diff --git a/test/issue1005-configuration-resolution/main/source/app.d b/test/new_tests/issue1005-configuration-resolution/sample/main/source/app.d similarity index 100% rename from test/issue1005-configuration-resolution/main/source/app.d rename to test/new_tests/issue1005-configuration-resolution/sample/main/source/app.d diff --git a/test/new_tests/issue1005-configuration-resolution/source/app.d b/test/new_tests/issue1005-configuration-resolution/source/app.d new file mode 100644 index 0000000000..b04ed53a43 --- /dev/null +++ b/test/new_tests/issue1005-configuration-resolution/source/app.d @@ -0,0 +1,11 @@ +import common; + +import std.process; + +void main () { + auto p = spawnProcess( + [dub, "build", "--bare", "main"], null, Config.none, "sample"); + + if (p.wait != 0) + die("Dub build failed"); +} From 04d6c75efa412ba2acccad9f793e4431cce16235 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 19 Jul 2025 12:15:32 +0300 Subject: [PATCH 065/187] issue1024-selective-upgrade Signed-off-by: Andrei Horodniceanu --- test/issue1024-selective-upgrade.sh | 14 ---------- test/issue1024-selective-upgrade/.no_build | 0 .../issue1024-selective-upgrade/.gitignore | 4 +++ .../issue1024-selective-upgrade/dub.json | 8 ++++++ .../sample}/a-1.0.0/dub.sdl | 0 .../sample}/a-1.0.1/dub.sdl | 0 .../sample}/b-1.0.0/dub.sdl | 0 .../sample}/b-1.0.1/dub.sdl | 0 .../sample}/main/dub.sdl | 0 .../issue1024-selective-upgrade/source/app.d | 27 +++++++++++++++++++ 10 files changed, 39 insertions(+), 14 deletions(-) delete mode 100755 test/issue1024-selective-upgrade.sh delete mode 100644 test/issue1024-selective-upgrade/.no_build create mode 100644 test/new_tests/issue1024-selective-upgrade/.gitignore create mode 100644 test/new_tests/issue1024-selective-upgrade/dub.json rename test/{issue1024-selective-upgrade => new_tests/issue1024-selective-upgrade/sample}/a-1.0.0/dub.sdl (100%) rename test/{issue1024-selective-upgrade => new_tests/issue1024-selective-upgrade/sample}/a-1.0.1/dub.sdl (100%) rename test/{issue1024-selective-upgrade => new_tests/issue1024-selective-upgrade/sample}/b-1.0.0/dub.sdl (100%) rename test/{issue1024-selective-upgrade => new_tests/issue1024-selective-upgrade/sample}/b-1.0.1/dub.sdl (100%) rename test/{issue1024-selective-upgrade => new_tests/issue1024-selective-upgrade/sample}/main/dub.sdl (100%) create mode 100644 test/new_tests/issue1024-selective-upgrade/source/app.d diff --git a/test/issue1024-selective-upgrade.sh b/test/issue1024-selective-upgrade.sh deleted file mode 100755 index dc7c009713..0000000000 --- a/test/issue1024-selective-upgrade.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash - -. $(dirname "${BASH_SOURCE[0]}")/common.sh -cd ${CURR_DIR}/issue1024-selective-upgrade -echo "{\"fileVersion\": 1,\"versions\": {\"a\": \"1.0.0\", \"b\": \"1.0.0\"}}" > main/dub.selections.json -$DUB upgrade --bare --root=main a - -if ! grep -c -e "\"a\": \"1.0.1\"" main/dub.selections.json; then - die $LINENO "Specified dependency was not upgraded." -fi - -if grep -c -e "\"b\": \"1.0.1\"" main/dub.selections.json; then - die $LINENO "Non-specified dependency got upgraded." -fi diff --git a/test/issue1024-selective-upgrade/.no_build b/test/issue1024-selective-upgrade/.no_build deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/new_tests/issue1024-selective-upgrade/.gitignore b/test/new_tests/issue1024-selective-upgrade/.gitignore new file mode 100644 index 0000000000..71e6ee7a81 --- /dev/null +++ b/test/new_tests/issue1024-selective-upgrade/.gitignore @@ -0,0 +1,4 @@ +/sample/** +!/sample/ +!/sample/*/ +!/sample/*/dub.sdl \ No newline at end of file diff --git a/test/new_tests/issue1024-selective-upgrade/dub.json b/test/new_tests/issue1024-selective-upgrade/dub.json new file mode 100644 index 0000000000..1855a39d4b --- /dev/null +++ b/test/new_tests/issue1024-selective-upgrade/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue1024-selective-upgrade", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/issue1024-selective-upgrade/a-1.0.0/dub.sdl b/test/new_tests/issue1024-selective-upgrade/sample/a-1.0.0/dub.sdl similarity index 100% rename from test/issue1024-selective-upgrade/a-1.0.0/dub.sdl rename to test/new_tests/issue1024-selective-upgrade/sample/a-1.0.0/dub.sdl diff --git a/test/issue1024-selective-upgrade/a-1.0.1/dub.sdl b/test/new_tests/issue1024-selective-upgrade/sample/a-1.0.1/dub.sdl similarity index 100% rename from test/issue1024-selective-upgrade/a-1.0.1/dub.sdl rename to test/new_tests/issue1024-selective-upgrade/sample/a-1.0.1/dub.sdl diff --git a/test/issue1024-selective-upgrade/b-1.0.0/dub.sdl b/test/new_tests/issue1024-selective-upgrade/sample/b-1.0.0/dub.sdl similarity index 100% rename from test/issue1024-selective-upgrade/b-1.0.0/dub.sdl rename to test/new_tests/issue1024-selective-upgrade/sample/b-1.0.0/dub.sdl diff --git a/test/issue1024-selective-upgrade/b-1.0.1/dub.sdl b/test/new_tests/issue1024-selective-upgrade/sample/b-1.0.1/dub.sdl similarity index 100% rename from test/issue1024-selective-upgrade/b-1.0.1/dub.sdl rename to test/new_tests/issue1024-selective-upgrade/sample/b-1.0.1/dub.sdl diff --git a/test/issue1024-selective-upgrade/main/dub.sdl b/test/new_tests/issue1024-selective-upgrade/sample/main/dub.sdl similarity index 100% rename from test/issue1024-selective-upgrade/main/dub.sdl rename to test/new_tests/issue1024-selective-upgrade/sample/main/dub.sdl diff --git a/test/new_tests/issue1024-selective-upgrade/source/app.d b/test/new_tests/issue1024-selective-upgrade/source/app.d new file mode 100644 index 0000000000..0145319de3 --- /dev/null +++ b/test/new_tests/issue1024-selective-upgrade/source/app.d @@ -0,0 +1,27 @@ +import common; + +import std.algorithm; +import std.process; +import std.file; + +void main () { + chdir("sample"); + write("main/dub.selections.json", ` +{ + "fileVersion": 1, + "versions": { + "a": "1.0.0", + "b": "1.0.0" + } +}`); + + auto p = spawnProcess([dub, "upgrade", "--bare", "--root=main", "a"]); + if (p.wait != 0) + die("Dub upgrade failed"); + + immutable selections = readText("main/dub.selections.json"); + if (!selections.canFind(`"a": "1.0.1"`)) + die("Specified dependency was not upgraded."); + if (selections.canFind(`"b": "1.0.1"`)) + die("Non-specified dependency got upgraded."); +} From c91d9f8a77b2af6a515aacc94a9cfe642d21c2ea Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sun, 27 Jul 2025 15:25:49 +0300 Subject: [PATCH 066/187] issue1037-better-dependency-messages Signed-off-by: Andrei Horodniceanu --- test/expected-issue1037-output | 3 -- test/issue1037-better-dependency-messages.sh | 25 ---------------- .../.no_build | 0 .../.no_run | 0 .../.no_test | 0 .../.gitignore | 5 ++++ .../dub.json | 8 +++++ .../sample}/b/dub.json | 0 .../sample}/dub.json | 0 .../source/app.d | 29 +++++++++++++++++++ 10 files changed, 42 insertions(+), 28 deletions(-) delete mode 100644 test/expected-issue1037-output delete mode 100755 test/issue1037-better-dependency-messages.sh delete mode 100644 test/issue1037-better-dependency-messages/.no_build delete mode 100644 test/issue1037-better-dependency-messages/.no_run delete mode 100644 test/issue1037-better-dependency-messages/.no_test create mode 100644 test/new_tests/issue1037-better-dependency-messages/.gitignore create mode 100644 test/new_tests/issue1037-better-dependency-messages/dub.json rename test/{issue1037-better-dependency-messages => new_tests/issue1037-better-dependency-messages/sample}/b/dub.json (100%) rename test/{issue1037-better-dependency-messages => new_tests/issue1037-better-dependency-messages/sample}/dub.json (100%) create mode 100644 test/new_tests/issue1037-better-dependency-messages/source/app.d diff --git a/test/expected-issue1037-output b/test/expected-issue1037-output deleted file mode 100644 index 2f1964705e..0000000000 --- a/test/expected-issue1037-output +++ /dev/null @@ -1,3 +0,0 @@ -Error Unresolvable dependencies to package gitcompatibledubpackage: - b @DIR/b depends on gitcompatibledubpackage ~>1.0.2 - issue1037-better-dependency-messages ~master depends on gitcompatibledubpackage 1.0.1 diff --git a/test/issue1037-better-dependency-messages.sh b/test/issue1037-better-dependency-messages.sh deleted file mode 100755 index 8847382ce4..0000000000 --- a/test/issue1037-better-dependency-messages.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash -set -e -o pipefail - -cd ${CURR_DIR}/issue1037-better-dependency-messages - -temp_file=$(mktemp $(basename $0).XXXXXX) -temp_file2=$(mktemp $(basename $0).XXXXXX) -expected_file="$CURR_DIR/expected-issue1037-output" - -function cleanup { - rm -f $temp_file - rm -f $temp_file2 -} - -trap cleanup EXIT - -sed "s#DIR#$CURR_DIR/issue1037-better-dependency-messages#" "$expected_file" > "$temp_file2" - -$DUB upgrade 2>$temp_file && exit 1 # dub upgrade should fail - -if ! diff "$temp_file2" "$temp_file"; then - die $LINENO 'output not containing conflict information' -fi - -exit 0 diff --git a/test/issue1037-better-dependency-messages/.no_build b/test/issue1037-better-dependency-messages/.no_build deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/issue1037-better-dependency-messages/.no_run b/test/issue1037-better-dependency-messages/.no_run deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/issue1037-better-dependency-messages/.no_test b/test/issue1037-better-dependency-messages/.no_test deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/new_tests/issue1037-better-dependency-messages/.gitignore b/test/new_tests/issue1037-better-dependency-messages/.gitignore new file mode 100644 index 0000000000..11d1d2b8f9 --- /dev/null +++ b/test/new_tests/issue1037-better-dependency-messages/.gitignore @@ -0,0 +1,5 @@ +/sample/** +!/sample/ +!/sample/dub.json +!/sample/*/ +!/sample/*/dub.json \ No newline at end of file diff --git a/test/new_tests/issue1037-better-dependency-messages/dub.json b/test/new_tests/issue1037-better-dependency-messages/dub.json new file mode 100644 index 0000000000..6770fe2a46 --- /dev/null +++ b/test/new_tests/issue1037-better-dependency-messages/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue1037-better-dependency-message", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/issue1037-better-dependency-messages/b/dub.json b/test/new_tests/issue1037-better-dependency-messages/sample/b/dub.json similarity index 100% rename from test/issue1037-better-dependency-messages/b/dub.json rename to test/new_tests/issue1037-better-dependency-messages/sample/b/dub.json diff --git a/test/issue1037-better-dependency-messages/dub.json b/test/new_tests/issue1037-better-dependency-messages/sample/dub.json similarity index 100% rename from test/issue1037-better-dependency-messages/dub.json rename to test/new_tests/issue1037-better-dependency-messages/sample/dub.json diff --git a/test/new_tests/issue1037-better-dependency-messages/source/app.d b/test/new_tests/issue1037-better-dependency-messages/source/app.d new file mode 100644 index 0000000000..942b692459 --- /dev/null +++ b/test/new_tests/issue1037-better-dependency-messages/source/app.d @@ -0,0 +1,29 @@ +import common; + +import std.algorithm; +import std.array; +import std.file; +import std.format; +import std.process; +import std.path; +import std.string; +import std.stdio; + +void main () { + chdir("sample"); + + auto p = teeProcess([dub, "upgrade"]); + if (p.pid.wait == 0) + die("Dub upgrade should have failed"); + + immutable expected = [ + `Error Unresolvable dependencies to package gitcompatibledubpackage:`, + ` b @%s depends on gitcompatibledubpackage ~>1.0.2`.format(getcwd.buildPath("b")), + ` issue1037-better-dependency-messages ~master depends on gitcompatibledubpackage 1.0.1`, + ]; + + const got = p.stderrLines; + + if (!equal(got, expected)) + die("output not containting conflict information"); +} From 23758a0c5f6289f41a802447c66f4f7eb32e245b Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 19 Jul 2025 14:31:21 +0300 Subject: [PATCH 067/187] issue103-single-file-package Signed-off-by: Andrei Horodniceanu --- test/issue103-single-file-package.sh | 30 ------------- .../issue103-single-file-package/.gitignore | 6 +++ .../issue103-single-file-package/dub.json | 8 ++++ .../sample/json.d} | 0 .../sample/no-ext} | 2 +- .../sample/sdl.d} | 2 +- .../sample/w-dep.d} | 2 +- .../issue103-single-file-package/source/app.d | 44 +++++++++++++++++++ 8 files changed, 61 insertions(+), 33 deletions(-) delete mode 100755 test/issue103-single-file-package.sh create mode 100644 test/new_tests/issue103-single-file-package/.gitignore create mode 100644 test/new_tests/issue103-single-file-package/dub.json rename test/{issue103-single-file-package-json.d => new_tests/issue103-single-file-package/sample/json.d} (100%) rename test/{issue103-single-file-package-no-ext => new_tests/issue103-single-file-package/sample/no-ext} (90%) rename test/{issue103-single-file-package.d => new_tests/issue103-single-file-package/sample/sdl.d} (90%) rename test/{issue103-single-file-package-w-dep.d => new_tests/issue103-single-file-package/sample/w-dep.d} (60%) create mode 100644 test/new_tests/issue103-single-file-package/source/app.d diff --git a/test/issue103-single-file-package.sh b/test/issue103-single-file-package.sh deleted file mode 100755 index 671e5186ad..0000000000 --- a/test/issue103-single-file-package.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env bash -. $(dirname "${BASH_SOURCE[0]}")/common.sh -cd ${CURR_DIR} -rm -f single-file-test - -${DUB} run --single issue103-single-file-package-json.d --compiler=${DC} -if [ ! -f single-file-test ]; then - die $LINENO 'Normal invocation did not produce a binary in the current directory' -fi -rm single-file-test - -./issue103-single-file-package.d foo -- bar -${DUB} ./issue103-single-file-package foo -- bar -./issue103-single-file-package-no-ext foo -- bar - -${DUB} issue103-single-file-package-w-dep.d - -if [ -f single-file-test ]; then - die $LINENO 'Shebang invocation produced binary in current directory' -fi - -if ! { ${DUB} run --single issue103-single-file-package-w-dep.d --temp-build 2>&1 || true; } | grep -cF "To force a rebuild"; then - echo "Invocation triggered unnecessary rebuild." - exit 1 -fi - -if ${DUB} "issue103-single-file-package-error.d" 2> /dev/null; then - echo "Invalid package comment syntax did not trigger an error." - exit 1 -fi diff --git a/test/new_tests/issue103-single-file-package/.gitignore b/test/new_tests/issue103-single-file-package/.gitignore new file mode 100644 index 0000000000..5fe33ec91f --- /dev/null +++ b/test/new_tests/issue103-single-file-package/.gitignore @@ -0,0 +1,6 @@ +sample/* +!sample/ +!sample/sdl.d +!sample/json.d +!sample/no-ext +!sample/w-dep.d \ No newline at end of file diff --git a/test/new_tests/issue103-single-file-package/dub.json b/test/new_tests/issue103-single-file-package/dub.json new file mode 100644 index 0000000000..00fb4f1c1f --- /dev/null +++ b/test/new_tests/issue103-single-file-package/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue103-single-file-package", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/issue103-single-file-package-json.d b/test/new_tests/issue103-single-file-package/sample/json.d similarity index 100% rename from test/issue103-single-file-package-json.d rename to test/new_tests/issue103-single-file-package/sample/json.d diff --git a/test/issue103-single-file-package-no-ext b/test/new_tests/issue103-single-file-package/sample/no-ext similarity index 90% rename from test/issue103-single-file-package-no-ext rename to test/new_tests/issue103-single-file-package/sample/no-ext index 8c766389a0..922da3769d 100755 --- a/test/issue103-single-file-package-no-ext +++ b/test/new_tests/issue103-single-file-package/sample/no-ext @@ -1,4 +1,4 @@ -#!../bin/dub +#!../../../../bin/dub /+ dub.sdl: name "single-file-test" +/ diff --git a/test/issue103-single-file-package.d b/test/new_tests/issue103-single-file-package/sample/sdl.d similarity index 90% rename from test/issue103-single-file-package.d rename to test/new_tests/issue103-single-file-package/sample/sdl.d index 8c766389a0..922da3769d 100755 --- a/test/issue103-single-file-package.d +++ b/test/new_tests/issue103-single-file-package/sample/sdl.d @@ -1,4 +1,4 @@ -#!../bin/dub +#!../../../../bin/dub /+ dub.sdl: name "single-file-test" +/ diff --git a/test/issue103-single-file-package-w-dep.d b/test/new_tests/issue103-single-file-package/sample/w-dep.d similarity index 60% rename from test/issue103-single-file-package-w-dep.d rename to test/new_tests/issue103-single-file-package/sample/w-dep.d index 5f66241295..e012daaf32 100644 --- a/test/issue103-single-file-package-w-dep.d +++ b/test/new_tests/issue103-single-file-package/sample/w-dep.d @@ -1,6 +1,6 @@ /+ dub.sdl: name "single-file-test" -dependency "sourcelib-simple" path="1-sourceLib-simple" +dependency "sourcelib-simple" path="../../extra/1-sourceLib-simple" +/ module hello; diff --git a/test/new_tests/issue103-single-file-package/source/app.d b/test/new_tests/issue103-single-file-package/source/app.d new file mode 100644 index 0000000000..64396461c7 --- /dev/null +++ b/test/new_tests/issue103-single-file-package/source/app.d @@ -0,0 +1,44 @@ +import common; + +import std.algorithm; +import std.process; +import std.file; + +void main () { + chdir("sample"); + immutable exePath = "single-file-test" ~ DotExe; + + if (spawnProcess([dub, "run", "--single", "json.d"]).wait != 0) + die("Dub couldn't run single file json package"); + if (!exists(exePath)) + die("Normal invocation did not produce a binary in the current directory"); + remove(exePath); + + version(Posix) + if (spawnProcess(["./sdl.d", "foo", "--", "bar"]).wait != 0) + die("Failed running shebang script with extension"); + + if (spawnProcess([dub, "./sdl.d", "foo", "--", "bar"]).wait != 0) + die("Dub failed to run script with shebang"); + + version(Posix) + if (spawnProcess(["./no-ext", "foo", "--", "bar"]).wait != 0) + die("Failed running shebang script without extension"); + + if (spawnProcess([dub, "w-dep.d"]).wait != 0) + die("Dub couldn't run single file package with dependency"); + + if (exists(exePath)) + die("Shebang invocation produced binary in current directory"); + + { + auto p = execute([dub, "run", "w-dep.d", "--temp-build"]); + if (p.output.canFind("To force a rebuild")) + die("Invocation triggered unnecessary rebuild."); + } + + // missing from git? https://github.com/dlang/dub/pull/1177 was the one that should have added it + version(none) + if (spawnProcess([dub, "error.d"]).wait == 0) + die("Invalid package comment syntax did not trigger an error."); +} From 4d05d93ee21ddb48412a0fb64c32e3237b7966d2 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 19 Jul 2025 14:47:29 +0300 Subject: [PATCH 068/187] issue1040-run-with-ver Signed-off-by: Andrei Horodniceanu --- test/issue1040-run-with-ver.sh | 30 ----------------- .../new_tests/issue1040-run-with-ver/dub.json | 8 +++++ .../issue1040-run-with-ver/source/app.d | 33 +++++++++++++++++++ 3 files changed, 41 insertions(+), 30 deletions(-) delete mode 100755 test/issue1040-run-with-ver.sh create mode 100644 test/new_tests/issue1040-run-with-ver/dub.json create mode 100644 test/new_tests/issue1040-run-with-ver/source/app.d diff --git a/test/issue1040-run-with-ver.sh b/test/issue1040-run-with-ver.sh deleted file mode 100755 index 10b100496b..0000000000 --- a/test/issue1040-run-with-ver.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env bash - -. $(dirname "${BASH_SOURCE[0]}")/common.sh - -if ! [ -d ${CURR_DIR}/issue1040-tmpdir ]; then - mkdir ${CURR_DIR}/issue1040-tmpdir - touch ${CURR_DIR}/issue1040-tmpdir/.no_build - touch ${CURR_DIR}/issue1040-tmpdir/.no_run - touch ${CURR_DIR}/issue1040-tmpdir/.no_test - function cleanup { - rm -rf ${CURR_DIR}/issue1040-tmpdir - } - trap cleanup EXIT -fi - -cd ${CURR_DIR}/issue1040-tmpdir - -$DUB fetch dub@1.27.0 --cache=local -$DUB fetch dub@1.28.0 --cache=local -$DUB fetch dub@1.29.0 --cache=local - -if { $DUB fetch dub@1.28.0 --cache=local || true; } | grep -cF 'Fetching' > /dev/null; then - die $LINENO 'Test for doubly fetch of the specified version has failed.' -fi -if ! { $DUB run dub -q --cache=local -- --version || true; } | grep -cF 'DUB version 1.29.0' > /dev/null; then - die $LINENO 'Test for selection of the latest fetched version has failed.' -fi -if ! { $DUB run dub@1.28.0 -q --cache=local -- --version || true; } | grep -cF 'DUB version 1.28.0' > /dev/null; then - die $LINENO 'Test for selection of the specified version has failed.' -fi diff --git a/test/new_tests/issue1040-run-with-ver/dub.json b/test/new_tests/issue1040-run-with-ver/dub.json new file mode 100644 index 0000000000..34b3f5995c --- /dev/null +++ b/test/new_tests/issue1040-run-with-ver/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue1040-run-with-ver", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/new_tests/issue1040-run-with-ver/source/app.d b/test/new_tests/issue1040-run-with-ver/source/app.d new file mode 100644 index 0000000000..28fc03b015 --- /dev/null +++ b/test/new_tests/issue1040-run-with-ver/source/app.d @@ -0,0 +1,33 @@ +import common; + +import std.algorithm; +import std.path; +import std.file; +import std.process; + +void main() { + version(Windows) version(LDC) skip("ldc2 doesn't come with libcurl on windows"); + + if (exists("test")) rmdirRecurse("test"); + mkdir("test"); + chdir("test"); + + foreach (ver; ["1.27.0", "1.28.0", "1.29.0"]) + if (spawnProcess([dub, "fetch", "dub@" ~ ver, "--cache=local"]).wait != 0) + die("Dub fetch failed"); + + auto p = teeProcess([dub, "fetch", "dub@1.28.0"]); + p.wait; + if (p.stdout.canFind("Fetching")) + die("Test for doubly fetch of the specified version has failed."); + + p = teeProcess([dub, "run", "dub", "-q", "--cache=local", "--", "--version"]); + p.wait; + if (!p.stdout.canFind("DUB version 1.29.0")) + die("Test for selection of the latest fetched version has failed."); + + p = teeProcess([dub, "run", "dub@1.28.0", "-q", "--cache=local", "--", "--version"]); + p.wait; + if (!p.stdout.canFind("DUB version 1.28.0")) + die("Test for selection of the specified version has failed."); +} From 78ee315e1617e53610629e2c786ffdfa896dc368 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 19 Jul 2025 14:57:09 +0300 Subject: [PATCH 069/187] issue1053-extra-files-visuald Signed-off-by: Andrei Horodniceanu --- test/issue1053-extra-files-visuald.sh | 26 ------------------- .../issue1053-extra-files-visuald/.gitignore | 6 +++++ .../issue1053-extra-files-visuald/dub.json | 8 ++++++ .../sample}/dub.json | 0 .../sample}/shaders/saturate.vert | 0 .../sample}/shaders/warp.geom | 0 .../sample}/source/app.d | 0 .../sample}/text/LICENSE.txt | 0 .../sample}/text/README.txt | 0 .../source/app.d | 23 ++++++++++++++++ 10 files changed, 37 insertions(+), 26 deletions(-) delete mode 100755 test/issue1053-extra-files-visuald.sh create mode 100644 test/new_tests/issue1053-extra-files-visuald/.gitignore create mode 100644 test/new_tests/issue1053-extra-files-visuald/dub.json rename test/{issue1053-extra-files-visuald => new_tests/issue1053-extra-files-visuald/sample}/dub.json (100%) rename test/{issue1053-extra-files-visuald => new_tests/issue1053-extra-files-visuald/sample}/shaders/saturate.vert (100%) rename test/{issue1053-extra-files-visuald => new_tests/issue1053-extra-files-visuald/sample}/shaders/warp.geom (100%) rename test/{issue1053-extra-files-visuald => new_tests/issue1053-extra-files-visuald/sample}/source/app.d (100%) rename test/{issue1053-extra-files-visuald => new_tests/issue1053-extra-files-visuald/sample}/text/LICENSE.txt (100%) rename test/{issue1053-extra-files-visuald => new_tests/issue1053-extra-files-visuald/sample}/text/README.txt (100%) create mode 100644 test/new_tests/issue1053-extra-files-visuald/source/app.d diff --git a/test/issue1053-extra-files-visuald.sh b/test/issue1053-extra-files-visuald.sh deleted file mode 100755 index 4c8d9793b7..0000000000 --- a/test/issue1053-extra-files-visuald.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash - -. $(dirname "${BASH_SOURCE[0]}")/common.sh -cd "${CURR_DIR}/issue1053-extra-files-visuald" || die "Could not cd." - -"$DUB" generate visuald - -if [ `grep -c -e "saturate.vert" .dub/extra_files.visualdproj` -ne 1 ]; then - die $LINENO 'Regression of issue #1053.' -fi - -if [ `grep -c -e "warp.geom" .dub/extra_files.visualdproj` -ne 1 ]; then - die $LINENO 'Regression of issue #1053.' -fi - -if [ `grep -c -e "LICENSE.txt" .dub/extra_files.visualdproj` -ne 1 ]; then - die $LINENO 'Regression of issue #1053.' -fi - -if [ `grep -c -e "README.txt" .dub/extra_files.visualdproj` -ne 1 ]; then - die $LINENO 'Regression of issue #1053.' -fi - -if [ `grep -e "README.txt" .dub/extra_files.visualdproj | grep -c -e 'copy /Y $(InputPath) $(TargetDir)'` -ne 1 ]; then - die $LINENO 'Copying of copyFiles seems broken for visuald.' -fi diff --git a/test/new_tests/issue1053-extra-files-visuald/.gitignore b/test/new_tests/issue1053-extra-files-visuald/.gitignore new file mode 100644 index 0000000000..5431d8dd5d --- /dev/null +++ b/test/new_tests/issue1053-extra-files-visuald/.gitignore @@ -0,0 +1,6 @@ +/sample/* +!/sample/ +!/sample/dub.json +!/sample/text/ +!/sample/shaders +!/sample/source \ No newline at end of file diff --git a/test/new_tests/issue1053-extra-files-visuald/dub.json b/test/new_tests/issue1053-extra-files-visuald/dub.json new file mode 100644 index 0000000000..200f45b55f --- /dev/null +++ b/test/new_tests/issue1053-extra-files-visuald/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue1053-extra-files-visuald", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/issue1053-extra-files-visuald/dub.json b/test/new_tests/issue1053-extra-files-visuald/sample/dub.json similarity index 100% rename from test/issue1053-extra-files-visuald/dub.json rename to test/new_tests/issue1053-extra-files-visuald/sample/dub.json diff --git a/test/issue1053-extra-files-visuald/shaders/saturate.vert b/test/new_tests/issue1053-extra-files-visuald/sample/shaders/saturate.vert similarity index 100% rename from test/issue1053-extra-files-visuald/shaders/saturate.vert rename to test/new_tests/issue1053-extra-files-visuald/sample/shaders/saturate.vert diff --git a/test/issue1053-extra-files-visuald/shaders/warp.geom b/test/new_tests/issue1053-extra-files-visuald/sample/shaders/warp.geom similarity index 100% rename from test/issue1053-extra-files-visuald/shaders/warp.geom rename to test/new_tests/issue1053-extra-files-visuald/sample/shaders/warp.geom diff --git a/test/issue1053-extra-files-visuald/source/app.d b/test/new_tests/issue1053-extra-files-visuald/sample/source/app.d similarity index 100% rename from test/issue1053-extra-files-visuald/source/app.d rename to test/new_tests/issue1053-extra-files-visuald/sample/source/app.d diff --git a/test/issue1053-extra-files-visuald/text/LICENSE.txt b/test/new_tests/issue1053-extra-files-visuald/sample/text/LICENSE.txt similarity index 100% rename from test/issue1053-extra-files-visuald/text/LICENSE.txt rename to test/new_tests/issue1053-extra-files-visuald/sample/text/LICENSE.txt diff --git a/test/issue1053-extra-files-visuald/text/README.txt b/test/new_tests/issue1053-extra-files-visuald/sample/text/README.txt similarity index 100% rename from test/issue1053-extra-files-visuald/text/README.txt rename to test/new_tests/issue1053-extra-files-visuald/sample/text/README.txt diff --git a/test/new_tests/issue1053-extra-files-visuald/source/app.d b/test/new_tests/issue1053-extra-files-visuald/source/app.d new file mode 100644 index 0000000000..fee35c659e --- /dev/null +++ b/test/new_tests/issue1053-extra-files-visuald/source/app.d @@ -0,0 +1,23 @@ +import common; + +import std.algorithm; +import std.file; +import std.path; +import std.process; + +void main () { + chdir("sample"); + + if (spawnProcess([dub, "generate", "visuald"]).wait != 0) + die("Dub couldn't generate visuald project"); + + immutable proj = readText(".dub/extra_files.visualdproj"); + + foreach (needle; ["saturate.vert" , "saturate.vert" , "LICENSE.txt" , "README.txt" ]) + if (!proj.canFind(needle)) + die("regression of issue #1053"); + + immutable lineWithREADME = proj.splitter('\n').filter!(line => line.canFind("README.txt")).front; + if (!lineWithREADME.canFind("copy /Y $(InputPath) $(TargetDir)")) + die("Copying of copyFiles seems broken for visuald."); +} From b2e8d622a2735d89c64d99d2e43e633087afbab3 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 19 Jul 2025 15:14:25 +0300 Subject: [PATCH 070/187] issue1070-init-mistakes-dirs-as-files Signed-off-by: Andrei Horodniceanu --- test/issue1070-init-mistakes-dirs-as-files.sh | 5 ----- .../.no_build | 0 .../.no_run | 0 .../.no_test | 0 .../.gitignore | 3 +++ .../dub.json | 8 ++++++++ .../sample}/source/.empty | 0 .../source/app.d | 16 ++++++++++++++++ 8 files changed, 27 insertions(+), 5 deletions(-) delete mode 100755 test/issue1070-init-mistakes-dirs-as-files.sh delete mode 100644 test/issue1070-init-mistakes-dirs-as-files/.no_build delete mode 100644 test/issue1070-init-mistakes-dirs-as-files/.no_run delete mode 100644 test/issue1070-init-mistakes-dirs-as-files/.no_test create mode 100644 test/new_tests/issue1070-init-mistakes-dirs-as-files/.gitignore create mode 100644 test/new_tests/issue1070-init-mistakes-dirs-as-files/dub.json rename test/{issue1070-init-mistakes-dirs-as-files => new_tests/issue1070-init-mistakes-dirs-as-files/sample}/source/.empty (100%) create mode 100644 test/new_tests/issue1070-init-mistakes-dirs-as-files/source/app.d diff --git a/test/issue1070-init-mistakes-dirs-as-files.sh b/test/issue1070-init-mistakes-dirs-as-files.sh deleted file mode 100755 index 4cd8e85765..0000000000 --- a/test/issue1070-init-mistakes-dirs-as-files.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -cd ${CURR_DIR}/issue1070-init-mistakes-dirs-as-files - -${DUB} init 2>&1 | grep -c "The target directory already contains a 'source/' directory. Aborting." > /dev/null \ No newline at end of file diff --git a/test/issue1070-init-mistakes-dirs-as-files/.no_build b/test/issue1070-init-mistakes-dirs-as-files/.no_build deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/issue1070-init-mistakes-dirs-as-files/.no_run b/test/issue1070-init-mistakes-dirs-as-files/.no_run deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/issue1070-init-mistakes-dirs-as-files/.no_test b/test/issue1070-init-mistakes-dirs-as-files/.no_test deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/new_tests/issue1070-init-mistakes-dirs-as-files/.gitignore b/test/new_tests/issue1070-init-mistakes-dirs-as-files/.gitignore new file mode 100644 index 0000000000..a4145133e1 --- /dev/null +++ b/test/new_tests/issue1070-init-mistakes-dirs-as-files/.gitignore @@ -0,0 +1,3 @@ +!/sample/ +!/sample/source/ +!/sample/source/.empty \ No newline at end of file diff --git a/test/new_tests/issue1070-init-mistakes-dirs-as-files/dub.json b/test/new_tests/issue1070-init-mistakes-dirs-as-files/dub.json new file mode 100644 index 0000000000..489062a82c --- /dev/null +++ b/test/new_tests/issue1070-init-mistakes-dirs-as-files/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue1070-ini-tmistakes-dirs-as-files", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/issue1070-init-mistakes-dirs-as-files/source/.empty b/test/new_tests/issue1070-init-mistakes-dirs-as-files/sample/source/.empty similarity index 100% rename from test/issue1070-init-mistakes-dirs-as-files/source/.empty rename to test/new_tests/issue1070-init-mistakes-dirs-as-files/sample/source/.empty diff --git a/test/new_tests/issue1070-init-mistakes-dirs-as-files/source/app.d b/test/new_tests/issue1070-init-mistakes-dirs-as-files/source/app.d new file mode 100644 index 0000000000..d57db3e041 --- /dev/null +++ b/test/new_tests/issue1070-init-mistakes-dirs-as-files/source/app.d @@ -0,0 +1,16 @@ +import common; + +import std.algorithm; +import std.path; +import std.file; +import std.process; + +void main() { + chdir("sample"); + + auto p = teeProcess([dub, "init"], Redirect.stdout | Redirect.stderrToStdout); + p.wait; + immutable expected = "The target directory already contains a 'source/' directory. Aborting."; + if (!p.stdout.canFind(expected)) + die("Dub init dit not fail as expected"); +} From ded0dba7b0cc858b1c9a7bf3f380252f4027c474 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 19 Jul 2025 15:31:27 +0300 Subject: [PATCH 071/187] issue1091-bogus-rebuild Signed-off-by: Andrei Horodniceanu --- test/issue1091-bogus-rebuild.sh | 9 -------- .../issue1091-bogus-rebuild/.gitignore | 4 ++++ .../issue1091-bogus-rebuild/dub.json | 8 +++++++ .../issue1091-bogus-rebuild/sample/dub.sdl | 1 + .../sample/source/app.d | 1 + .../issue1091-bogus-rebuild/source/app.d | 23 +++++++++++++++++++ 6 files changed, 37 insertions(+), 9 deletions(-) delete mode 100755 test/issue1091-bogus-rebuild.sh create mode 100644 test/new_tests/issue1091-bogus-rebuild/.gitignore create mode 100644 test/new_tests/issue1091-bogus-rebuild/dub.json create mode 100644 test/new_tests/issue1091-bogus-rebuild/sample/dub.sdl create mode 100644 test/new_tests/issue1091-bogus-rebuild/sample/source/app.d create mode 100644 test/new_tests/issue1091-bogus-rebuild/source/app.d diff --git a/test/issue1091-bogus-rebuild.sh b/test/issue1091-bogus-rebuild.sh deleted file mode 100755 index 3198d42960..0000000000 --- a/test/issue1091-bogus-rebuild.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash - -. $(dirname "${BASH_SOURCE[0]}")/common.sh - -cd ${CURR_DIR}/1-exec-simple -rm -f dub.selections.json -${DUB} clean -${DUB} build --compiler=${DC} 2>&1 | grep -e 'building configuration' -c -${DUB} build --compiler=${DC} 2>&1 | { ! grep -e 'building configuration' -c; } diff --git a/test/new_tests/issue1091-bogus-rebuild/.gitignore b/test/new_tests/issue1091-bogus-rebuild/.gitignore new file mode 100644 index 0000000000..a6f49491b9 --- /dev/null +++ b/test/new_tests/issue1091-bogus-rebuild/.gitignore @@ -0,0 +1,4 @@ +sample/* +!sample/ +!sample/dub.sdl +!sample/source/ \ No newline at end of file diff --git a/test/new_tests/issue1091-bogus-rebuild/dub.json b/test/new_tests/issue1091-bogus-rebuild/dub.json new file mode 100644 index 0000000000..d000f86ab5 --- /dev/null +++ b/test/new_tests/issue1091-bogus-rebuild/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue1091-bogus-rebuild", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/new_tests/issue1091-bogus-rebuild/sample/dub.sdl b/test/new_tests/issue1091-bogus-rebuild/sample/dub.sdl new file mode 100644 index 0000000000..e1c33695c4 --- /dev/null +++ b/test/new_tests/issue1091-bogus-rebuild/sample/dub.sdl @@ -0,0 +1 @@ +name "sample" \ No newline at end of file diff --git a/test/new_tests/issue1091-bogus-rebuild/sample/source/app.d b/test/new_tests/issue1091-bogus-rebuild/sample/source/app.d new file mode 100644 index 0000000000..d66321b3c5 --- /dev/null +++ b/test/new_tests/issue1091-bogus-rebuild/sample/source/app.d @@ -0,0 +1 @@ +void main () {} diff --git a/test/new_tests/issue1091-bogus-rebuild/source/app.d b/test/new_tests/issue1091-bogus-rebuild/source/app.d new file mode 100644 index 0000000000..ec0927c181 --- /dev/null +++ b/test/new_tests/issue1091-bogus-rebuild/source/app.d @@ -0,0 +1,23 @@ +import common; + +import std.algorithm; +import std.process; +import std.file; + +void main () { + immutable dub = environment["DUB"]; + chdir("sample"); + + if (spawnProcess([dub, "clean"]).wait != 0) + die("Dub clean failed"); + + auto p = teeProcess([dub, "build"], Redirect.stdout | Redirect.stderrToStdout); + p.wait; + if (!p.stdout.canFind("building configuration")) + die("Dub didn't build the package"); + + p = teeProcess([dub, "build"], Redirect.stdout | Redirect.stderrToStdout); + p.wait; + if (p.stdout.canFind("building configuration")) + die("Dub rebuilt the package"); +} From 1e79f950b5b132a776cdb088b97d5e370395769b Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 19 Jul 2025 15:31:37 +0300 Subject: [PATCH 072/187] issue1117-extra-dependency-files Signed-off-by: Andrei Horodniceanu --- test/issue1117-extra-dependency-files.sh | 21 -------------- .../.gitignore | 8 ----- .../dependency.txt | 1 - .../.gitignore | 5 ++++ .../issue1117-extra-dependency-files/dub.json | 8 +++++ .../sample/dependency.txt} | 0 .../sample}/dub.json | 2 +- .../sample}/source/app.d | 0 .../source/app.d | 29 +++++++++++++++++++ 9 files changed, 43 insertions(+), 31 deletions(-) delete mode 100755 test/issue1117-extra-dependency-files.sh delete mode 100644 test/issue1117-extra-dependency-files/.gitignore delete mode 100644 test/issue1117-extra-dependency-files/dependency.txt create mode 100644 test/new_tests/issue1117-extra-dependency-files/.gitignore create mode 100644 test/new_tests/issue1117-extra-dependency-files/dub.json rename test/{issue1117-extra-dependency-files/.no_build => new_tests/issue1117-extra-dependency-files/sample/dependency.txt} (100%) rename test/{issue1117-extra-dependency-files => new_tests/issue1117-extra-dependency-files/sample}/dub.json (96%) rename test/{issue1117-extra-dependency-files => new_tests/issue1117-extra-dependency-files/sample}/source/app.d (100%) create mode 100644 test/new_tests/issue1117-extra-dependency-files/source/app.d diff --git a/test/issue1117-extra-dependency-files.sh b/test/issue1117-extra-dependency-files.sh deleted file mode 100755 index 7bb268c2f1..0000000000 --- a/test/issue1117-extra-dependency-files.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash - -. $(dirname "${BASH_SOURCE[0]}")/common.sh -cd ${CURR_DIR}/issue1117-extra-dependency-files - -# Ensure the test can be re-run -${DUB} clean - -if ! { ${DUB} build 2>&1 || true; } | grep -cF 'building configuration'; then - die $LINENO 'Build was not executed.' -fi - -if ! { ${DUB} build 2>&1 || true; } | grep -cF 'is up to date'; then - die $LINENO 'Build was executed.' -fi - -touch ./dependency.txt - -if ! { ${DUB} build 2>&1 || true; } | grep -cF 'building configuration'; then - die $LINENO 'Build was not executed.' -fi diff --git a/test/issue1117-extra-dependency-files/.gitignore b/test/issue1117-extra-dependency-files/.gitignore deleted file mode 100644 index 304e9559a5..0000000000 --- a/test/issue1117-extra-dependency-files/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -.dub -docs.json -__dummy.html -docs/ -*.exe -*.o -*.obj -*.lst diff --git a/test/issue1117-extra-dependency-files/dependency.txt b/test/issue1117-extra-dependency-files/dependency.txt deleted file mode 100644 index 5ab2f8a432..0000000000 --- a/test/issue1117-extra-dependency-files/dependency.txt +++ /dev/null @@ -1 +0,0 @@ -Hello \ No newline at end of file diff --git a/test/new_tests/issue1117-extra-dependency-files/.gitignore b/test/new_tests/issue1117-extra-dependency-files/.gitignore new file mode 100644 index 0000000000..ced4e3f25a --- /dev/null +++ b/test/new_tests/issue1117-extra-dependency-files/.gitignore @@ -0,0 +1,5 @@ +sample/* +!sample/ +!sample/dependency.txt +!sample/dub.json +!sample/source \ No newline at end of file diff --git a/test/new_tests/issue1117-extra-dependency-files/dub.json b/test/new_tests/issue1117-extra-dependency-files/dub.json new file mode 100644 index 0000000000..34d22e0eac --- /dev/null +++ b/test/new_tests/issue1117-extra-dependency-files/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue1117-extra-dependency-files", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/issue1117-extra-dependency-files/.no_build b/test/new_tests/issue1117-extra-dependency-files/sample/dependency.txt similarity index 100% rename from test/issue1117-extra-dependency-files/.no_build rename to test/new_tests/issue1117-extra-dependency-files/sample/dependency.txt diff --git a/test/issue1117-extra-dependency-files/dub.json b/test/new_tests/issue1117-extra-dependency-files/sample/dub.json similarity index 96% rename from test/issue1117-extra-dependency-files/dub.json rename to test/new_tests/issue1117-extra-dependency-files/sample/dub.json index 00e57a9313..5e21a6e4a0 100644 --- a/test/issue1117-extra-dependency-files/dub.json +++ b/test/new_tests/issue1117-extra-dependency-files/sample/dub.json @@ -1,4 +1,4 @@ { "name": "test", "extraDependencyFiles": ["dependency.txt"] -} \ No newline at end of file +} diff --git a/test/issue1117-extra-dependency-files/source/app.d b/test/new_tests/issue1117-extra-dependency-files/sample/source/app.d similarity index 100% rename from test/issue1117-extra-dependency-files/source/app.d rename to test/new_tests/issue1117-extra-dependency-files/sample/source/app.d diff --git a/test/new_tests/issue1117-extra-dependency-files/source/app.d b/test/new_tests/issue1117-extra-dependency-files/source/app.d new file mode 100644 index 0000000000..1c3a4b4076 --- /dev/null +++ b/test/new_tests/issue1117-extra-dependency-files/source/app.d @@ -0,0 +1,29 @@ +import common; + +import std.algorithm; +import std.process; +import std.file; + +void main () { + chdir("sample"); + + if (spawnProcess([dub, "clean"]).wait != 0) + die("Dub clean failed"); + + auto p = teeProcess([dub, "build"], Redirect.stdout | Redirect.stderrToStdout); + p.wait; + if (!p.stdout.canFind("building configuration")) + die("Build was not executed."); + + p = teeProcess([dub, "build"], Redirect.stdout | Redirect.stderrToStdout); + p.wait; + if (!p.stdout.canFind("is up to date")) + die("Build was executed."); + + write("dependency.txt", ""); + + p = teeProcess([dub, "build"], Redirect.stdout | Redirect.stderrToStdout); + p.wait; + if (!p.stdout.canFind("building configuration")) + die("Build was not executed."); +} From 39925c5fa2daad850e7533068bb97ada7539c98a Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 19 Jul 2025 15:35:14 +0300 Subject: [PATCH 073/187] issue1136-temp-copy-files Signed-off-by: Andrei Horodniceanu --- test/issue1136-temp-copy-files.sh | 6 ------ test/issue1136-temp-copy-files/.no_build | 0 test/new_tests/issue1136-temp-copy-files/.gitignore | 6 ++++++ test/new_tests/issue1136-temp-copy-files/dub.json | 8 ++++++++ .../issue1136-temp-copy-files/sample}/app.d | 2 +- .../issue1136-temp-copy-files/sample}/mylib/dub.sdl | 0 .../sample}/mylib/helloworld.txt | 0 test/new_tests/issue1136-temp-copy-files/source/app.d | 10 ++++++++++ 8 files changed, 25 insertions(+), 7 deletions(-) delete mode 100755 test/issue1136-temp-copy-files.sh delete mode 100644 test/issue1136-temp-copy-files/.no_build create mode 100644 test/new_tests/issue1136-temp-copy-files/.gitignore create mode 100644 test/new_tests/issue1136-temp-copy-files/dub.json rename test/{issue1136-temp-copy-files => new_tests/issue1136-temp-copy-files/sample}/app.d (99%) rename test/{issue1136-temp-copy-files => new_tests/issue1136-temp-copy-files/sample}/mylib/dub.sdl (100%) rename test/{issue1136-temp-copy-files => new_tests/issue1136-temp-copy-files/sample}/mylib/helloworld.txt (100%) create mode 100644 test/new_tests/issue1136-temp-copy-files/source/app.d diff --git a/test/issue1136-temp-copy-files.sh b/test/issue1136-temp-copy-files.sh deleted file mode 100755 index ab935cbc93..0000000000 --- a/test/issue1136-temp-copy-files.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env bash - -. $(dirname "${BASH_SOURCE[0]}")/common.sh -cd ${CURR_DIR}/issue1136-temp-copy-files - -"$DUB" app.d diff --git a/test/issue1136-temp-copy-files/.no_build b/test/issue1136-temp-copy-files/.no_build deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/new_tests/issue1136-temp-copy-files/.gitignore b/test/new_tests/issue1136-temp-copy-files/.gitignore new file mode 100644 index 0000000000..29e445c2e6 --- /dev/null +++ b/test/new_tests/issue1136-temp-copy-files/.gitignore @@ -0,0 +1,6 @@ +sample/** +!sample/ +!sample/app.d +!sample/mylib/ +!sample/mylib/dub.sdl +!sample/mylib/helloworld.txt \ No newline at end of file diff --git a/test/new_tests/issue1136-temp-copy-files/dub.json b/test/new_tests/issue1136-temp-copy-files/dub.json new file mode 100644 index 0000000000..e1faa16bd5 --- /dev/null +++ b/test/new_tests/issue1136-temp-copy-files/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue1136-temp-copy-files", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/issue1136-temp-copy-files/app.d b/test/new_tests/issue1136-temp-copy-files/sample/app.d similarity index 99% rename from test/issue1136-temp-copy-files/app.d rename to test/new_tests/issue1136-temp-copy-files/sample/app.d index 388398430f..b927ee1e63 100644 --- a/test/issue1136-temp-copy-files/app.d +++ b/test/new_tests/issue1136-temp-copy-files/sample/app.d @@ -12,4 +12,4 @@ void main() { string filePath = buildPath(thisExePath.dirName, "helloworld.txt"); enforce(filePath.exists); -} \ No newline at end of file +} diff --git a/test/issue1136-temp-copy-files/mylib/dub.sdl b/test/new_tests/issue1136-temp-copy-files/sample/mylib/dub.sdl similarity index 100% rename from test/issue1136-temp-copy-files/mylib/dub.sdl rename to test/new_tests/issue1136-temp-copy-files/sample/mylib/dub.sdl diff --git a/test/issue1136-temp-copy-files/mylib/helloworld.txt b/test/new_tests/issue1136-temp-copy-files/sample/mylib/helloworld.txt similarity index 100% rename from test/issue1136-temp-copy-files/mylib/helloworld.txt rename to test/new_tests/issue1136-temp-copy-files/sample/mylib/helloworld.txt diff --git a/test/new_tests/issue1136-temp-copy-files/source/app.d b/test/new_tests/issue1136-temp-copy-files/source/app.d new file mode 100644 index 0000000000..81728b97ea --- /dev/null +++ b/test/new_tests/issue1136-temp-copy-files/source/app.d @@ -0,0 +1,10 @@ +import common; + +import std.algorithm; +import std.process; +import std.file; + +void main () { + if (spawnProcess([dub, "app.d"], null, Config.none, "sample").wait != 0) + die("dub failed"); +} From 1818f44f86ebd922496ca45aeda82c89bb8a8e3d Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 19 Jul 2025 23:35:01 +0300 Subject: [PATCH 074/187] issue1158-stdin-for-single-file Signed-off-by: Andrei Horodniceanu --- test/issue1158-stdin-for-single-files.sh | 9 --------- .../issue1158-stdin-for-single-files/.no_build | 0 .../.gitignore | 1 + .../issue1158-stdin-for-single-files/dub.json | 8 ++++++++ .../source/app.d | 18 ++++++++++++++++++ .../issue1158-stdin-for-single-files/stdin.d | 0 6 files changed, 27 insertions(+), 9 deletions(-) delete mode 100755 test/issue1158-stdin-for-single-files.sh delete mode 100644 test/issue1158-stdin-for-single-files/.no_build create mode 100644 test/new_tests/issue1158-stdin-for-single-files/.gitignore create mode 100644 test/new_tests/issue1158-stdin-for-single-files/dub.json create mode 100644 test/new_tests/issue1158-stdin-for-single-files/source/app.d rename test/{ => new_tests}/issue1158-stdin-for-single-files/stdin.d (100%) diff --git a/test/issue1158-stdin-for-single-files.sh b/test/issue1158-stdin-for-single-files.sh deleted file mode 100755 index 1d2baea680..0000000000 --- a/test/issue1158-stdin-for-single-files.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash - -. $(dirname "${BASH_SOURCE[0]}")/common.sh - -cd ${CURR_DIR}/issue1158-stdin-for-single-files - -if ! { cat stdin.d | ${DUB} - --value=v 2>&1 || true; } | grep -cF '["--value=v"]'; then - die $LINENO 'Stdin for single files failed.' -fi \ No newline at end of file diff --git a/test/issue1158-stdin-for-single-files/.no_build b/test/issue1158-stdin-for-single-files/.no_build deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/new_tests/issue1158-stdin-for-single-files/.gitignore b/test/new_tests/issue1158-stdin-for-single-files/.gitignore new file mode 100644 index 0000000000..81c519c1d7 --- /dev/null +++ b/test/new_tests/issue1158-stdin-for-single-files/.gitignore @@ -0,0 +1 @@ +!/stdin.d \ No newline at end of file diff --git a/test/new_tests/issue1158-stdin-for-single-files/dub.json b/test/new_tests/issue1158-stdin-for-single-files/dub.json new file mode 100644 index 0000000000..9fc4eb2732 --- /dev/null +++ b/test/new_tests/issue1158-stdin-for-single-files/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue1158-stdin-for-single-files", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/new_tests/issue1158-stdin-for-single-files/source/app.d b/test/new_tests/issue1158-stdin-for-single-files/source/app.d new file mode 100644 index 0000000000..460f65daf1 --- /dev/null +++ b/test/new_tests/issue1158-stdin-for-single-files/source/app.d @@ -0,0 +1,18 @@ +import common; + +import std.array; +import std.algorithm; +import std.process; +import std.file; + +void main () { + immutable stdin = readText("stdin.d"); + auto p = teeProcess([dub, "-", "--value=v"]); + p.stdin.write(stdin); + p.stdin.close(); + if (p.pid.wait != 0) + die("Dub run failed"); + + if (!p.stdout.canFind(`["--value=v"]`)) + die("Stdin for single files failed."); +} diff --git a/test/issue1158-stdin-for-single-files/stdin.d b/test/new_tests/issue1158-stdin-for-single-files/stdin.d similarity index 100% rename from test/issue1158-stdin-for-single-files/stdin.d rename to test/new_tests/issue1158-stdin-for-single-files/stdin.d From b3e645775e598cc885e24d6e0f56ddb2de65640a Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 19 Jul 2025 16:25:53 +0300 Subject: [PATCH 075/187] extra/issue1416 Signed-off-by: Andrei Horodniceanu --- test/issue1416-maven-repo-pkg-supplier/.gitignore | 8 -------- test/issue1416-maven-repo-pkg-supplier/.no_build | 0 .../issue1416-maven-repo-pkg-supplier/.gitignore | 2 ++ .../1.0.5/maven-dubpackage-1.0.5.zip | Bin .../1.0.6/maven-dubpackage-1.0.6.zip | Bin .../dubpackages/maven-dubpackage/maven-metadata.xml | 0 6 files changed, 2 insertions(+), 8 deletions(-) delete mode 100644 test/issue1416-maven-repo-pkg-supplier/.gitignore delete mode 100644 test/issue1416-maven-repo-pkg-supplier/.no_build create mode 100644 test/new_tests/extra/issue1416-maven-repo-pkg-supplier/.gitignore rename test/{ => new_tests/extra}/issue1416-maven-repo-pkg-supplier/maven/release/dubpackages/maven-dubpackage/1.0.5/maven-dubpackage-1.0.5.zip (100%) rename test/{ => new_tests/extra}/issue1416-maven-repo-pkg-supplier/maven/release/dubpackages/maven-dubpackage/1.0.6/maven-dubpackage-1.0.6.zip (100%) rename test/{ => new_tests/extra}/issue1416-maven-repo-pkg-supplier/maven/release/dubpackages/maven-dubpackage/maven-metadata.xml (100%) diff --git a/test/issue1416-maven-repo-pkg-supplier/.gitignore b/test/issue1416-maven-repo-pkg-supplier/.gitignore deleted file mode 100644 index 304e9559a5..0000000000 --- a/test/issue1416-maven-repo-pkg-supplier/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -.dub -docs.json -__dummy.html -docs/ -*.exe -*.o -*.obj -*.lst diff --git a/test/issue1416-maven-repo-pkg-supplier/.no_build b/test/issue1416-maven-repo-pkg-supplier/.no_build deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/new_tests/extra/issue1416-maven-repo-pkg-supplier/.gitignore b/test/new_tests/extra/issue1416-maven-repo-pkg-supplier/.gitignore new file mode 100644 index 0000000000..d3de5a3391 --- /dev/null +++ b/test/new_tests/extra/issue1416-maven-repo-pkg-supplier/.gitignore @@ -0,0 +1,2 @@ +!/maven/ +!/maven/** diff --git a/test/issue1416-maven-repo-pkg-supplier/maven/release/dubpackages/maven-dubpackage/1.0.5/maven-dubpackage-1.0.5.zip b/test/new_tests/extra/issue1416-maven-repo-pkg-supplier/maven/release/dubpackages/maven-dubpackage/1.0.5/maven-dubpackage-1.0.5.zip similarity index 100% rename from test/issue1416-maven-repo-pkg-supplier/maven/release/dubpackages/maven-dubpackage/1.0.5/maven-dubpackage-1.0.5.zip rename to test/new_tests/extra/issue1416-maven-repo-pkg-supplier/maven/release/dubpackages/maven-dubpackage/1.0.5/maven-dubpackage-1.0.5.zip diff --git a/test/issue1416-maven-repo-pkg-supplier/maven/release/dubpackages/maven-dubpackage/1.0.6/maven-dubpackage-1.0.6.zip b/test/new_tests/extra/issue1416-maven-repo-pkg-supplier/maven/release/dubpackages/maven-dubpackage/1.0.6/maven-dubpackage-1.0.6.zip similarity index 100% rename from test/issue1416-maven-repo-pkg-supplier/maven/release/dubpackages/maven-dubpackage/1.0.6/maven-dubpackage-1.0.6.zip rename to test/new_tests/extra/issue1416-maven-repo-pkg-supplier/maven/release/dubpackages/maven-dubpackage/1.0.6/maven-dubpackage-1.0.6.zip diff --git a/test/issue1416-maven-repo-pkg-supplier/maven/release/dubpackages/maven-dubpackage/maven-metadata.xml b/test/new_tests/extra/issue1416-maven-repo-pkg-supplier/maven/release/dubpackages/maven-dubpackage/maven-metadata.xml similarity index 100% rename from test/issue1416-maven-repo-pkg-supplier/maven/release/dubpackages/maven-dubpackage/maven-metadata.xml rename to test/new_tests/extra/issue1416-maven-repo-pkg-supplier/maven/release/dubpackages/maven-dubpackage/maven-metadata.xml From b5017f5d19042ff8c24828b942de6733488f8e58 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 19 Jul 2025 16:26:14 +0300 Subject: [PATCH 076/187] issue1180-local-cache-broken Signed-off-by: Andrei Horodniceanu --- test/issue1180-local-cache-broken.sh | 21 ------------ ...sue1180-local-cache-broken.sh.min_frontend | 1 - test/issue1180-local-cache-broken/.gitignore | 4 --- test/issue1180-local-cache-broken/.no_build | 0 .../issue1180-local-cache-broken/.gitignore | 4 +++ .../issue1180-local-cache-broken/dub.json | 11 +++++++ .../sample}/dub.json | 2 +- .../sample}/source/app.d | 0 .../issue1180-local-cache-broken/source/app.d | 32 +++++++++++++++++++ .../issue1180-local-cache-broken/test.config | 3 ++ 10 files changed, 51 insertions(+), 27 deletions(-) delete mode 100755 test/issue1180-local-cache-broken.sh delete mode 100644 test/issue1180-local-cache-broken.sh.min_frontend delete mode 100644 test/issue1180-local-cache-broken/.gitignore delete mode 100644 test/issue1180-local-cache-broken/.no_build create mode 100644 test/new_tests/issue1180-local-cache-broken/.gitignore create mode 100644 test/new_tests/issue1180-local-cache-broken/dub.json rename test/{issue1180-local-cache-broken => new_tests/issue1180-local-cache-broken/sample}/dub.json (97%) rename test/{issue1180-local-cache-broken => new_tests/issue1180-local-cache-broken/sample}/source/app.d (100%) create mode 100644 test/new_tests/issue1180-local-cache-broken/source/app.d create mode 100644 test/new_tests/issue1180-local-cache-broken/test.config diff --git a/test/issue1180-local-cache-broken.sh b/test/issue1180-local-cache-broken.sh deleted file mode 100755 index 41a8588001..0000000000 --- a/test/issue1180-local-cache-broken.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash -DIR=$(dirname "${BASH_SOURCE[0]}") - -. "$DIR"/common.sh - -PORT=$(getRandomPort) - -"$DUB" remove maven-dubpackage --root="$DIR/issue1180-local-cache-broken" --non-interactive 2>/dev/null || true - -"$DUB" build --single "$DIR"/test_registry.d -"$DIR"/test_registry --folder="$DIR/issue1416-maven-repo-pkg-supplier" --port=$PORT & -PID=$! -sleep 1 -trap 'kill $PID 2>/dev/null || true' exit - -echo "Trying to download maven-dubpackage (1.0.5)" -"$DUB" upgrade --root="$DIR/issue1180-local-cache-broken" --cache=local --skip-registry=all --registry=mvn+http://localhost:$PORT/maven/release/dubpackages - -if ! "$DUB" remove maven-dubpackage@1.0.5 --root="$DIR/issue1180-local-cache-broken" --non-interactive 2>/dev/null; then - die $LINENO 'DUB did not install package from maven registry.' -fi diff --git a/test/issue1180-local-cache-broken.sh.min_frontend b/test/issue1180-local-cache-broken.sh.min_frontend deleted file mode 100644 index 4817f99644..0000000000 --- a/test/issue1180-local-cache-broken.sh.min_frontend +++ /dev/null @@ -1 +0,0 @@ -2.077 diff --git a/test/issue1180-local-cache-broken/.gitignore b/test/issue1180-local-cache-broken/.gitignore deleted file mode 100644 index 0fd9d379b1..0000000000 --- a/test/issue1180-local-cache-broken/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -test -*.o -*.exe -.dub \ No newline at end of file diff --git a/test/issue1180-local-cache-broken/.no_build b/test/issue1180-local-cache-broken/.no_build deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/new_tests/issue1180-local-cache-broken/.gitignore b/test/new_tests/issue1180-local-cache-broken/.gitignore new file mode 100644 index 0000000000..fbd04c7ffd --- /dev/null +++ b/test/new_tests/issue1180-local-cache-broken/.gitignore @@ -0,0 +1,4 @@ +sample/* +!sample/ +!sample/dub.json +!sample/source/ \ No newline at end of file diff --git a/test/new_tests/issue1180-local-cache-broken/dub.json b/test/new_tests/issue1180-local-cache-broken/dub.json new file mode 100644 index 0000000000..931da376e8 --- /dev/null +++ b/test/new_tests/issue1180-local-cache-broken/dub.json @@ -0,0 +1,11 @@ +{ + "name": "issue1180-local-cache-broken", + "dependencies": { + "common": { + "path": "../common" + }, + "test_registry_helper": { + "path": "../extra/test_registry" + } + } +} diff --git a/test/issue1180-local-cache-broken/dub.json b/test/new_tests/issue1180-local-cache-broken/sample/dub.json similarity index 97% rename from test/issue1180-local-cache-broken/dub.json rename to test/new_tests/issue1180-local-cache-broken/sample/dub.json index 495617df11..bbb4768aa0 100644 --- a/test/issue1180-local-cache-broken/dub.json +++ b/test/new_tests/issue1180-local-cache-broken/sample/dub.json @@ -4,4 +4,4 @@ "maven-dubpackage": "1.0.5" } -} \ No newline at end of file +} diff --git a/test/issue1180-local-cache-broken/source/app.d b/test/new_tests/issue1180-local-cache-broken/sample/source/app.d similarity index 100% rename from test/issue1180-local-cache-broken/source/app.d rename to test/new_tests/issue1180-local-cache-broken/sample/source/app.d diff --git a/test/new_tests/issue1180-local-cache-broken/source/app.d b/test/new_tests/issue1180-local-cache-broken/source/app.d new file mode 100644 index 0000000000..43701bc8c6 --- /dev/null +++ b/test/new_tests/issue1180-local-cache-broken/source/app.d @@ -0,0 +1,32 @@ +import common; +import test_registry_helper; + +import std.algorithm; +import std.path; +import std.process; +import std.file; +import std.stdio; + +void main () { + auto testRegistry = TestRegistry("../extra/issue1416-maven-repo-pkg-supplier"); + + // Ignore errors + execute([dub, "remove", "maven-dubpackage", "--root=sample", "--non-interactive"]); + + immutable mvnUrl = "mvn+http://localhost:" ~ testRegistry.port ~ "/maven/release/dubpackages"; + + log("Trying to download maven-dubpackage (1.0.5)"); + auto p = spawnProcess([ + dub, + "upgrade", + "--root=sample", + "--cache=local", + "--skip-registry=all", + "--registry=" ~ mvnUrl, + ]); + if (p.wait != 0) + die("Dub upgrade failed"); + + if (spawnProcess([dub, "remove", "maven-dubpackage@1.0.5", "--root=sample", "--non-interactive"]).wait != 0) + die("DUB did not install package from maven registry."); +} diff --git a/test/new_tests/issue1180-local-cache-broken/test.config b/test/new_tests/issue1180-local-cache-broken/test.config new file mode 100644 index 0000000000..cc1dd48245 --- /dev/null +++ b/test/new_tests/issue1180-local-cache-broken/test.config @@ -0,0 +1,3 @@ +locks = test_registry +# openssl failes to build with gdmd +dc_backend = [dmd, ldc] \ No newline at end of file From 03ed829880c2906f28689505424913dc40d4b88a Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 19 Jul 2025 19:15:39 +0300 Subject: [PATCH 077/187] issue1194-warn-wrong-subconfig Signed-off-by: Andrei Horodniceanu --- test/issue1194-warn-wrong-subconfig.sh | 16 ------------- test/issue1194-warn-wrong-subconfig/.no_build | 0 .../issue1194-warn-wrong-subconfig/.gitignore | 4 ++++ .../issue1194-warn-wrong-subconfig/dub.json | 8 +++++++ .../sample}/dub.sdl | 4 ++-- .../sample}/source/app.d | 0 .../source/app.d | 23 +++++++++++++++++++ 7 files changed, 37 insertions(+), 18 deletions(-) delete mode 100755 test/issue1194-warn-wrong-subconfig.sh delete mode 100644 test/issue1194-warn-wrong-subconfig/.no_build create mode 100644 test/new_tests/issue1194-warn-wrong-subconfig/.gitignore create mode 100644 test/new_tests/issue1194-warn-wrong-subconfig/dub.json rename test/{issue1194-warn-wrong-subconfig => new_tests/issue1194-warn-wrong-subconfig/sample}/dub.sdl (54%) rename test/{issue1194-warn-wrong-subconfig => new_tests/issue1194-warn-wrong-subconfig/sample}/source/app.d (100%) create mode 100644 test/new_tests/issue1194-warn-wrong-subconfig/source/app.d diff --git a/test/issue1194-warn-wrong-subconfig.sh b/test/issue1194-warn-wrong-subconfig.sh deleted file mode 100755 index 2bb7e542e9..0000000000 --- a/test/issue1194-warn-wrong-subconfig.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env bash -set -e - -OUTPUT=`${DUB} build --root ${CURR_DIR}/issue1194-warn-wrong-subconfig 2>&1 || true` - -trap 'printf "%s" "Failing received output:\n$OUTPUT" | hexdump -C' ERR - -# make sure the proper errors occur in the output -echo "$OUTPUT" | fgrep -c 'sub configuration directive "bar" -> [baz] references a package that is not specified as a dependency' > /dev/null -echo $OUTPUT | fgrep -c 'sub configuration directive "staticlib-simple" -> [foo] references a configuration that does not exist' > /dev/null -! echo $OUTPUT | fgrep -c 'sub configuration directive "sourcelib-simple" -> [library] references a package that is not specified as a dependency' > /dev/null -! echo $OUTPUT | fgrep -c 'sub configuration directive "sourcelib-simple" -> [library] references a configuration that does not exist' > /dev/null - -# make sure no bogs warnings are issued for packages with no sub configuration directives -OUTPUT=`${DUB} build --root ${CURR_DIR}/1-exec-simple 2>&1` -! echo $OUTPUT | grep -c 'sub configuration directive.*references' > /dev/null diff --git a/test/issue1194-warn-wrong-subconfig/.no_build b/test/issue1194-warn-wrong-subconfig/.no_build deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/new_tests/issue1194-warn-wrong-subconfig/.gitignore b/test/new_tests/issue1194-warn-wrong-subconfig/.gitignore new file mode 100644 index 0000000000..a6f49491b9 --- /dev/null +++ b/test/new_tests/issue1194-warn-wrong-subconfig/.gitignore @@ -0,0 +1,4 @@ +sample/* +!sample/ +!sample/dub.sdl +!sample/source/ \ No newline at end of file diff --git a/test/new_tests/issue1194-warn-wrong-subconfig/dub.json b/test/new_tests/issue1194-warn-wrong-subconfig/dub.json new file mode 100644 index 0000000000..25a6c43287 --- /dev/null +++ b/test/new_tests/issue1194-warn-wrong-subconfig/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue1194-warn-wrong-subconfig", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/issue1194-warn-wrong-subconfig/dub.sdl b/test/new_tests/issue1194-warn-wrong-subconfig/sample/dub.sdl similarity index 54% rename from test/issue1194-warn-wrong-subconfig/dub.sdl rename to test/new_tests/issue1194-warn-wrong-subconfig/sample/dub.sdl index 867864ddf5..a6ab975df9 100644 --- a/test/issue1194-warn-wrong-subconfig/dub.sdl +++ b/test/new_tests/issue1194-warn-wrong-subconfig/sample/dub.sdl @@ -1,6 +1,6 @@ name "test" -dependency "staticlib-simple" path="../1-staticLib-simple" -dependency "sourcelib-simple" path="../1-sourceLib-simple" +dependency "staticlib-simple" path="../../1-staticLib-simple" +dependency "sourcelib-simple" path="../../extra/1-sourceLib-simple" targetType "executable" subConfiguration "staticlib-simple" "foo" diff --git a/test/issue1194-warn-wrong-subconfig/source/app.d b/test/new_tests/issue1194-warn-wrong-subconfig/sample/source/app.d similarity index 100% rename from test/issue1194-warn-wrong-subconfig/source/app.d rename to test/new_tests/issue1194-warn-wrong-subconfig/sample/source/app.d diff --git a/test/new_tests/issue1194-warn-wrong-subconfig/source/app.d b/test/new_tests/issue1194-warn-wrong-subconfig/source/app.d new file mode 100644 index 0000000000..3f3b9bf29a --- /dev/null +++ b/test/new_tests/issue1194-warn-wrong-subconfig/source/app.d @@ -0,0 +1,23 @@ +import common; + +import std.algorithm; +import std.process; +import std.file; +import std.regex; + +void main () { + auto p = teeProcess([dub, "build", "--root=sample"], Redirect.stdout | Redirect.stderrToStdout); + p.wait; + // make sure the proper errors occur in the output + assert(p.stdout.canFind(`sub configuration directive "bar" -> [baz] references a package that is not specified as a dependency`)); + assert(p.stdout.canFind(`sub configuration directive "staticlib-simple" -> [foo] references a configuration that does not exist`)); + assert(!p.stdout.canFind(`sub configuration directive "sourcelib-simple" -> [library] references a package that is not specified as a dependency`)); + assert(!p.stdout.canFind(`sub configuration directive "sourcelib-simple" -> [library] references a configuration that does not exist`)); + + // make sure no bogus warnings are issued for packages with no sub configuration directives + p = teeProcess([dub, "build", "--root=../1-exec-simple"], Redirect.stdout | Redirect.stderrToStdout); + if (p.wait != 0) + die("dub build 1-exec-simple failed"); + if (p.stdout.matchFirst(`sub configuration directive.*references`)) + die("didn't find the correct line in output"); +} From 04b128d1d6bcab0c70f8d9848ac79d00cd45240e Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 19 Jul 2025 19:17:49 +0300 Subject: [PATCH 078/187] issue1262-version-inheritance Signed-off-by: Andrei Horodniceanu --- test/issue1262-version-inheritance/.gitignore | 15 --------------- test/issue1262-version-inheritance/.no_run | 0 test/issue1262-version-inheritance/.no_test | 0 .../daughter/.gitignore | 14 -------------- .../daughter/dub.sdl | 3 --- test/issue1262-version-inheritance/dub.sdl | 4 ---- test/issue1262-version-inheritance/son/.gitignore | 14 -------------- test/issue1262-version-inheritance/son/dub.sdl | 2 -- .../issue1262-version-inheritance/.gitignore | 2 ++ .../daughter/dub.sdl | 3 +++ .../daughter/source/dummy.d | 0 .../issue1262-version-inheritance/dub.sdl | 4 ++++ .../issue1262-version-inheritance/son/dub.sdl | 2 ++ .../son/source/dummy.d | 0 .../issue1262-version-inheritance/source/app.d | 0 .../issue1262-version-inheritance/test.config | 1 + 16 files changed, 12 insertions(+), 52 deletions(-) delete mode 100644 test/issue1262-version-inheritance/.gitignore delete mode 100644 test/issue1262-version-inheritance/.no_run delete mode 100644 test/issue1262-version-inheritance/.no_test delete mode 100644 test/issue1262-version-inheritance/daughter/.gitignore delete mode 100644 test/issue1262-version-inheritance/daughter/dub.sdl delete mode 100644 test/issue1262-version-inheritance/dub.sdl delete mode 100644 test/issue1262-version-inheritance/son/.gitignore delete mode 100644 test/issue1262-version-inheritance/son/dub.sdl create mode 100644 test/new_tests/issue1262-version-inheritance/.gitignore create mode 100644 test/new_tests/issue1262-version-inheritance/daughter/dub.sdl rename test/{ => new_tests}/issue1262-version-inheritance/daughter/source/dummy.d (100%) create mode 100644 test/new_tests/issue1262-version-inheritance/dub.sdl create mode 100644 test/new_tests/issue1262-version-inheritance/son/dub.sdl rename test/{ => new_tests}/issue1262-version-inheritance/son/source/dummy.d (100%) rename test/{ => new_tests}/issue1262-version-inheritance/source/app.d (100%) create mode 100644 test/new_tests/issue1262-version-inheritance/test.config diff --git a/test/issue1262-version-inheritance/.gitignore b/test/issue1262-version-inheritance/.gitignore deleted file mode 100644 index 84dca77bd2..0000000000 --- a/test/issue1262-version-inheritance/.gitignore +++ /dev/null @@ -1,15 +0,0 @@ -.dub -docs.json -__dummy.html -docs/ -issue1262-version-inheritance -issue1262-version-inheritance.so -issue1262-version-inheritance.dylib -issue1262-version-inheritance.dll -issue1262-version-inheritance.a -issue1262-version-inheritance.lib -issue1262-version-inheritance-test-* -*.exe -*.o -*.obj -*.lst diff --git a/test/issue1262-version-inheritance/.no_run b/test/issue1262-version-inheritance/.no_run deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/issue1262-version-inheritance/.no_test b/test/issue1262-version-inheritance/.no_test deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/issue1262-version-inheritance/daughter/.gitignore b/test/issue1262-version-inheritance/daughter/.gitignore deleted file mode 100644 index f190acb869..0000000000 --- a/test/issue1262-version-inheritance/daughter/.gitignore +++ /dev/null @@ -1,14 +0,0 @@ -.dub -docs.json -__dummy.html -docs/ -daughter.so -daughter.dylib -daughter.dll -daughter.a -daughter.lib -daughter-test-* -*.exe -*.o -*.obj -*.lst diff --git a/test/issue1262-version-inheritance/daughter/dub.sdl b/test/issue1262-version-inheritance/daughter/dub.sdl deleted file mode 100644 index baa3295606..0000000000 --- a/test/issue1262-version-inheritance/daughter/dub.sdl +++ /dev/null @@ -1,3 +0,0 @@ -name "daughter" -versions "Daughter" - diff --git a/test/issue1262-version-inheritance/dub.sdl b/test/issue1262-version-inheritance/dub.sdl deleted file mode 100644 index 46568fbfc5..0000000000 --- a/test/issue1262-version-inheritance/dub.sdl +++ /dev/null @@ -1,4 +0,0 @@ -name "issue1262-version-inheritance" -versions "Parent" -dependency "daughter" path="daughter" -dependency "son" path="son" diff --git a/test/issue1262-version-inheritance/son/.gitignore b/test/issue1262-version-inheritance/son/.gitignore deleted file mode 100644 index 601a33b470..0000000000 --- a/test/issue1262-version-inheritance/son/.gitignore +++ /dev/null @@ -1,14 +0,0 @@ -.dub -docs.json -__dummy.html -docs/ -son.so -son.dylib -son.dll -son.a -son.lib -son-test-* -*.exe -*.o -*.obj -*.lst diff --git a/test/issue1262-version-inheritance/son/dub.sdl b/test/issue1262-version-inheritance/son/dub.sdl deleted file mode 100644 index 5882548ada..0000000000 --- a/test/issue1262-version-inheritance/son/dub.sdl +++ /dev/null @@ -1,2 +0,0 @@ -name "son" -versions "Son" diff --git a/test/new_tests/issue1262-version-inheritance/.gitignore b/test/new_tests/issue1262-version-inheritance/.gitignore new file mode 100644 index 0000000000..ae96d4212d --- /dev/null +++ b/test/new_tests/issue1262-version-inheritance/.gitignore @@ -0,0 +1,2 @@ +!/daughter +!/son diff --git a/test/new_tests/issue1262-version-inheritance/daughter/dub.sdl b/test/new_tests/issue1262-version-inheritance/daughter/dub.sdl new file mode 100644 index 0000000000..ff3251e913 --- /dev/null +++ b/test/new_tests/issue1262-version-inheritance/daughter/dub.sdl @@ -0,0 +1,3 @@ +name "issue1262-daughter" +versions "Daughter" + diff --git a/test/issue1262-version-inheritance/daughter/source/dummy.d b/test/new_tests/issue1262-version-inheritance/daughter/source/dummy.d similarity index 100% rename from test/issue1262-version-inheritance/daughter/source/dummy.d rename to test/new_tests/issue1262-version-inheritance/daughter/source/dummy.d diff --git a/test/new_tests/issue1262-version-inheritance/dub.sdl b/test/new_tests/issue1262-version-inheritance/dub.sdl new file mode 100644 index 0000000000..6b27f593ed --- /dev/null +++ b/test/new_tests/issue1262-version-inheritance/dub.sdl @@ -0,0 +1,4 @@ +name "issue1262-version-inheritance" +versions "Parent" +dependency "issue1262-daughter" path="daughter" +dependency "issue1262-son" path="son" diff --git a/test/new_tests/issue1262-version-inheritance/son/dub.sdl b/test/new_tests/issue1262-version-inheritance/son/dub.sdl new file mode 100644 index 0000000000..3f087ef5d4 --- /dev/null +++ b/test/new_tests/issue1262-version-inheritance/son/dub.sdl @@ -0,0 +1,2 @@ +name "issue1262-son" +versions "Son" diff --git a/test/issue1262-version-inheritance/son/source/dummy.d b/test/new_tests/issue1262-version-inheritance/son/source/dummy.d similarity index 100% rename from test/issue1262-version-inheritance/son/source/dummy.d rename to test/new_tests/issue1262-version-inheritance/son/source/dummy.d diff --git a/test/issue1262-version-inheritance/source/app.d b/test/new_tests/issue1262-version-inheritance/source/app.d similarity index 100% rename from test/issue1262-version-inheritance/source/app.d rename to test/new_tests/issue1262-version-inheritance/source/app.d diff --git a/test/new_tests/issue1262-version-inheritance/test.config b/test/new_tests/issue1262-version-inheritance/test.config new file mode 100644 index 0000000000..4c5009d257 --- /dev/null +++ b/test/new_tests/issue1262-version-inheritance/test.config @@ -0,0 +1 @@ +dub_command = build \ No newline at end of file From 7c973c5a60f4a72086b4f283a2cfa027254cbac8 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 19 Jul 2025 19:19:41 +0300 Subject: [PATCH 079/187] issue1262-version-inheritance-diamond Signed-off-by: Andrei Horodniceanu --- .../.gitignore | 15 --------------- .../issue1262-version-inheritance-diamond/.no_run | 0 .../.no_test | 0 .../daughter/.gitignore | 14 -------------- .../daughter/dub.sdl | 3 --- .../diamond/.gitignore | 14 -------------- .../diamond/dub.sdl | 2 -- .../issue1262-version-inheritance-diamond/dub.sdl | 4 ---- .../son/.gitignore | 14 -------------- .../son/dub.sdl | 3 --- .../.gitignore | 3 +++ .../daughter/dub.sdl | 3 +++ .../daughter/source/dummy.d | 0 .../diamond/dub.sdl | 2 ++ .../diamond/source/dummy.d | 0 .../issue1262-version-inheritance-diamond/dub.sdl | 4 ++++ .../son/dub.sdl | 3 +++ .../son/source/dummy.d | 0 .../source/app.d | 0 .../test.config | 1 + 20 files changed, 16 insertions(+), 69 deletions(-) delete mode 100644 test/issue1262-version-inheritance-diamond/.gitignore delete mode 100644 test/issue1262-version-inheritance-diamond/.no_run delete mode 100644 test/issue1262-version-inheritance-diamond/.no_test delete mode 100644 test/issue1262-version-inheritance-diamond/daughter/.gitignore delete mode 100644 test/issue1262-version-inheritance-diamond/daughter/dub.sdl delete mode 100644 test/issue1262-version-inheritance-diamond/diamond/.gitignore delete mode 100644 test/issue1262-version-inheritance-diamond/diamond/dub.sdl delete mode 100644 test/issue1262-version-inheritance-diamond/dub.sdl delete mode 100644 test/issue1262-version-inheritance-diamond/son/.gitignore delete mode 100644 test/issue1262-version-inheritance-diamond/son/dub.sdl create mode 100644 test/new_tests/issue1262-version-inheritance-diamond/.gitignore create mode 100644 test/new_tests/issue1262-version-inheritance-diamond/daughter/dub.sdl rename test/{ => new_tests}/issue1262-version-inheritance-diamond/daughter/source/dummy.d (100%) create mode 100644 test/new_tests/issue1262-version-inheritance-diamond/diamond/dub.sdl rename test/{ => new_tests}/issue1262-version-inheritance-diamond/diamond/source/dummy.d (100%) create mode 100644 test/new_tests/issue1262-version-inheritance-diamond/dub.sdl create mode 100644 test/new_tests/issue1262-version-inheritance-diamond/son/dub.sdl rename test/{ => new_tests}/issue1262-version-inheritance-diamond/son/source/dummy.d (100%) rename test/{ => new_tests}/issue1262-version-inheritance-diamond/source/app.d (100%) create mode 100644 test/new_tests/issue1262-version-inheritance-diamond/test.config diff --git a/test/issue1262-version-inheritance-diamond/.gitignore b/test/issue1262-version-inheritance-diamond/.gitignore deleted file mode 100644 index c09a5970c4..0000000000 --- a/test/issue1262-version-inheritance-diamond/.gitignore +++ /dev/null @@ -1,15 +0,0 @@ -.dub -docs.json -__dummy.html -docs/ -issue1262-version-inheritance-diamond -issue1262-version-inheritance-diamond.so -issue1262-version-inheritance-diamond.dylib -issue1262-version-inheritance-diamond.dll -issue1262-version-inheritance-diamond.a -issue1262-version-inheritance-diamond.lib -issue1262-version-inheritance-diamond-test-* -*.exe -*.o -*.obj -*.lst diff --git a/test/issue1262-version-inheritance-diamond/.no_run b/test/issue1262-version-inheritance-diamond/.no_run deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/issue1262-version-inheritance-diamond/.no_test b/test/issue1262-version-inheritance-diamond/.no_test deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/issue1262-version-inheritance-diamond/daughter/.gitignore b/test/issue1262-version-inheritance-diamond/daughter/.gitignore deleted file mode 100644 index f190acb869..0000000000 --- a/test/issue1262-version-inheritance-diamond/daughter/.gitignore +++ /dev/null @@ -1,14 +0,0 @@ -.dub -docs.json -__dummy.html -docs/ -daughter.so -daughter.dylib -daughter.dll -daughter.a -daughter.lib -daughter-test-* -*.exe -*.o -*.obj -*.lst diff --git a/test/issue1262-version-inheritance-diamond/daughter/dub.sdl b/test/issue1262-version-inheritance-diamond/daughter/dub.sdl deleted file mode 100644 index 3a0eee7b8d..0000000000 --- a/test/issue1262-version-inheritance-diamond/daughter/dub.sdl +++ /dev/null @@ -1,3 +0,0 @@ -name "daughter" -versions "Daughter" -dependency "diamond" path="../diamond" diff --git a/test/issue1262-version-inheritance-diamond/diamond/.gitignore b/test/issue1262-version-inheritance-diamond/diamond/.gitignore deleted file mode 100644 index c359a73474..0000000000 --- a/test/issue1262-version-inheritance-diamond/diamond/.gitignore +++ /dev/null @@ -1,14 +0,0 @@ -.dub -docs.json -__dummy.html -docs/ -diamond.so -diamond.dylib -diamond.dll -diamond.a -diamond.lib -diamond-test-* -*.exe -*.o -*.obj -*.lst diff --git a/test/issue1262-version-inheritance-diamond/diamond/dub.sdl b/test/issue1262-version-inheritance-diamond/diamond/dub.sdl deleted file mode 100644 index 85cb8a1307..0000000000 --- a/test/issue1262-version-inheritance-diamond/diamond/dub.sdl +++ /dev/null @@ -1,2 +0,0 @@ -name "diamond" -versions "Diamond" diff --git a/test/issue1262-version-inheritance-diamond/dub.sdl b/test/issue1262-version-inheritance-diamond/dub.sdl deleted file mode 100644 index 588adb82e3..0000000000 --- a/test/issue1262-version-inheritance-diamond/dub.sdl +++ /dev/null @@ -1,4 +0,0 @@ -name "issue1262-version-inheritance-diamond" -versions "Parent" -dependency "daughter" path="daughter" -dependency "son" path="son" diff --git a/test/issue1262-version-inheritance-diamond/son/.gitignore b/test/issue1262-version-inheritance-diamond/son/.gitignore deleted file mode 100644 index 601a33b470..0000000000 --- a/test/issue1262-version-inheritance-diamond/son/.gitignore +++ /dev/null @@ -1,14 +0,0 @@ -.dub -docs.json -__dummy.html -docs/ -son.so -son.dylib -son.dll -son.a -son.lib -son-test-* -*.exe -*.o -*.obj -*.lst diff --git a/test/issue1262-version-inheritance-diamond/son/dub.sdl b/test/issue1262-version-inheritance-diamond/son/dub.sdl deleted file mode 100644 index 41dc1be69c..0000000000 --- a/test/issue1262-version-inheritance-diamond/son/dub.sdl +++ /dev/null @@ -1,3 +0,0 @@ -name "son" -versions "Son" -dependency "diamond" path="../diamond" diff --git a/test/new_tests/issue1262-version-inheritance-diamond/.gitignore b/test/new_tests/issue1262-version-inheritance-diamond/.gitignore new file mode 100644 index 0000000000..24c94b803f --- /dev/null +++ b/test/new_tests/issue1262-version-inheritance-diamond/.gitignore @@ -0,0 +1,3 @@ +!/daughter +!/son +!/diamond diff --git a/test/new_tests/issue1262-version-inheritance-diamond/daughter/dub.sdl b/test/new_tests/issue1262-version-inheritance-diamond/daughter/dub.sdl new file mode 100644 index 0000000000..f41d55b815 --- /dev/null +++ b/test/new_tests/issue1262-version-inheritance-diamond/daughter/dub.sdl @@ -0,0 +1,3 @@ +name "issue1262-diamond-daughter" +versions "Daughter" +dependency "issue1262-diamond-diamond" path="../diamond" diff --git a/test/issue1262-version-inheritance-diamond/daughter/source/dummy.d b/test/new_tests/issue1262-version-inheritance-diamond/daughter/source/dummy.d similarity index 100% rename from test/issue1262-version-inheritance-diamond/daughter/source/dummy.d rename to test/new_tests/issue1262-version-inheritance-diamond/daughter/source/dummy.d diff --git a/test/new_tests/issue1262-version-inheritance-diamond/diamond/dub.sdl b/test/new_tests/issue1262-version-inheritance-diamond/diamond/dub.sdl new file mode 100644 index 0000000000..d543e1c96a --- /dev/null +++ b/test/new_tests/issue1262-version-inheritance-diamond/diamond/dub.sdl @@ -0,0 +1,2 @@ +name "issue1262-diamond-diamond" +versions "Diamond" diff --git a/test/issue1262-version-inheritance-diamond/diamond/source/dummy.d b/test/new_tests/issue1262-version-inheritance-diamond/diamond/source/dummy.d similarity index 100% rename from test/issue1262-version-inheritance-diamond/diamond/source/dummy.d rename to test/new_tests/issue1262-version-inheritance-diamond/diamond/source/dummy.d diff --git a/test/new_tests/issue1262-version-inheritance-diamond/dub.sdl b/test/new_tests/issue1262-version-inheritance-diamond/dub.sdl new file mode 100644 index 0000000000..cda35d55a9 --- /dev/null +++ b/test/new_tests/issue1262-version-inheritance-diamond/dub.sdl @@ -0,0 +1,4 @@ +name "issue1262-version-inheritance-diamond" +versions "Parent" +dependency "issue1262-diamond-daughter" path="daughter" +dependency "issue1262-diamond-son" path="son" diff --git a/test/new_tests/issue1262-version-inheritance-diamond/son/dub.sdl b/test/new_tests/issue1262-version-inheritance-diamond/son/dub.sdl new file mode 100644 index 0000000000..e2b1287104 --- /dev/null +++ b/test/new_tests/issue1262-version-inheritance-diamond/son/dub.sdl @@ -0,0 +1,3 @@ +name "issue1262-diamond-son" +versions "Son" +dependency "issue1262-diamond-diamond" path="../diamond" diff --git a/test/issue1262-version-inheritance-diamond/son/source/dummy.d b/test/new_tests/issue1262-version-inheritance-diamond/son/source/dummy.d similarity index 100% rename from test/issue1262-version-inheritance-diamond/son/source/dummy.d rename to test/new_tests/issue1262-version-inheritance-diamond/son/source/dummy.d diff --git a/test/issue1262-version-inheritance-diamond/source/app.d b/test/new_tests/issue1262-version-inheritance-diamond/source/app.d similarity index 100% rename from test/issue1262-version-inheritance-diamond/source/app.d rename to test/new_tests/issue1262-version-inheritance-diamond/source/app.d diff --git a/test/new_tests/issue1262-version-inheritance-diamond/test.config b/test/new_tests/issue1262-version-inheritance-diamond/test.config new file mode 100644 index 0000000000..4c5009d257 --- /dev/null +++ b/test/new_tests/issue1262-version-inheritance-diamond/test.config @@ -0,0 +1 @@ +dub_command = build \ No newline at end of file From 54de124bd204e701f9efc6bd774f280653bde3ce Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 19 Jul 2025 19:25:40 +0300 Subject: [PATCH 080/187] issue1277 Signed-off-by: Andrei Horodniceanu --- test/issue1277.sh | 8 -------- test/issue1277/.no_build | 0 test/new_tests/issue1277/.gitignore | 1 + test/new_tests/issue1277/dub.json | 8 ++++++++ .../issue1277/sample}/source/app.d | 0 test/new_tests/issue1277/source/app.d | 12 ++++++++++++ 6 files changed, 21 insertions(+), 8 deletions(-) delete mode 100755 test/issue1277.sh delete mode 100644 test/issue1277/.no_build create mode 100644 test/new_tests/issue1277/.gitignore create mode 100644 test/new_tests/issue1277/dub.json rename test/{issue1277 => new_tests/issue1277/sample}/source/app.d (100%) create mode 100644 test/new_tests/issue1277/source/app.d diff --git a/test/issue1277.sh b/test/issue1277.sh deleted file mode 100755 index 5471c8d773..0000000000 --- a/test/issue1277.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash - -. $(dirname "${BASH_SOURCE[0]}")/common.sh - -cd ${CURR_DIR}/issue1003-check-empty-ld-flags - -# It should fail -! ${DUB} --root=${CURR_DIR}/issue1277/ build diff --git a/test/issue1277/.no_build b/test/issue1277/.no_build deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/new_tests/issue1277/.gitignore b/test/new_tests/issue1277/.gitignore new file mode 100644 index 0000000000..911c163398 --- /dev/null +++ b/test/new_tests/issue1277/.gitignore @@ -0,0 +1 @@ +!/sample/ diff --git a/test/new_tests/issue1277/dub.json b/test/new_tests/issue1277/dub.json new file mode 100644 index 0000000000..0d34c521ea --- /dev/null +++ b/test/new_tests/issue1277/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue1277", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/issue1277/source/app.d b/test/new_tests/issue1277/sample/source/app.d similarity index 100% rename from test/issue1277/source/app.d rename to test/new_tests/issue1277/sample/source/app.d diff --git a/test/new_tests/issue1277/source/app.d b/test/new_tests/issue1277/source/app.d new file mode 100644 index 0000000000..b84fb2826e --- /dev/null +++ b/test/new_tests/issue1277/source/app.d @@ -0,0 +1,12 @@ +import common; + +import std.process; +import std.file; +import std.path; + +void main () { + auto p = spawnProcess( + [dub, "--root=" ~ getcwd().buildPath("sample"), "build"], null, Config.none, "../issue1003-check-empty-ld-flags"); + if (p.wait == 0) + die("Dub should have failed"); +} From 0af396693e6c32b5f55cc2f56ddb8f1400adaa7d Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 19 Jul 2025 19:26:41 +0300 Subject: [PATCH 081/187] =?UTF-8?q?issue130-unicode-=D0=A1=D0=9D=D0=90?= =?UTF-8?q?=D0=AF=D0=90=D0=A1=D0=A2=D0=95=D0=AF=D0=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Andrei Horodniceanu --- .../dub.sdl" | 1 - .../dub.sdl" | 1 + .../source/app.d" | 0 3 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 "test/issue130-unicode-\320\241\320\235\320\220\320\257\320\220\320\241\320\242\320\225\320\257\320\205/dub.sdl" create mode 100644 "test/new_tests/issue130-unicode-\320\241\320\235\320\220\320\257\320\220\320\241\320\242\320\225\320\257\320\205/dub.sdl" rename "test/issue130-unicode-\320\241\320\235\320\220\320\257\320\220\320\241\320\242\320\225\320\257\320\205/source/app.d" => "test/new_tests/issue130-unicode-\320\241\320\235\320\220\320\257\320\220\320\241\320\242\320\225\320\257\320\205/source/app.d" (100%) diff --git "a/test/issue130-unicode-\320\241\320\235\320\220\320\257\320\220\320\241\320\242\320\225\320\257\320\205/dub.sdl" "b/test/issue130-unicode-\320\241\320\235\320\220\320\257\320\220\320\241\320\242\320\225\320\257\320\205/dub.sdl" deleted file mode 100644 index 6bc471cf7a..0000000000 --- "a/test/issue130-unicode-\320\241\320\235\320\220\320\257\320\220\320\241\320\242\320\225\320\257\320\205/dub.sdl" +++ /dev/null @@ -1 +0,0 @@ -name "tests" diff --git "a/test/new_tests/issue130-unicode-\320\241\320\235\320\220\320\257\320\220\320\241\320\242\320\225\320\257\320\205/dub.sdl" "b/test/new_tests/issue130-unicode-\320\241\320\235\320\220\320\257\320\220\320\241\320\242\320\225\320\257\320\205/dub.sdl" new file mode 100644 index 0000000000..c68488d4c6 --- /dev/null +++ "b/test/new_tests/issue130-unicode-\320\241\320\235\320\220\320\257\320\220\320\241\320\242\320\225\320\257\320\205/dub.sdl" @@ -0,0 +1 @@ +name "issue130-unicode" diff --git "a/test/issue130-unicode-\320\241\320\235\320\220\320\257\320\220\320\241\320\242\320\225\320\257\320\205/source/app.d" "b/test/new_tests/issue130-unicode-\320\241\320\235\320\220\320\257\320\220\320\241\320\242\320\225\320\257\320\205/source/app.d" similarity index 100% rename from "test/issue130-unicode-\320\241\320\235\320\220\320\257\320\220\320\241\320\242\320\225\320\257\320\205/source/app.d" rename to "test/new_tests/issue130-unicode-\320\241\320\235\320\220\320\257\320\220\320\241\320\242\320\225\320\257\320\205/source/app.d" From 6df6651456c83ec627183d6599091386a91f89a8 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 19 Jul 2025 19:30:54 +0300 Subject: [PATCH 082/187] issue1350-transitive-none-deps Signed-off-by: Andrei Horodniceanu --- test/issue1350-transitive-none-deps/.gitignore | 15 --------------- test/issue1350-transitive-none-deps/.no_run | 0 test/issue1350-transitive-none-deps/.no_test | 0 .../common-none/dub.sdl | 3 --- test/issue1350-transitive-none-deps/dep1/dub.sdl | 4 ---- test/issue1350-transitive-none-deps/dep2/dub.sdl | 4 ---- test/issue1350-transitive-none-deps/dub.sdl | 5 ----- .../issue1350-transitive-none-deps/.gitignore | 5 +++++ .../common-dep/common.d | 0 .../common-dep/dub.sdl | 2 +- .../common-none/dub.sdl | 3 +++ .../issue1350-transitive-none-deps/dep1/dep1.d | 0 .../issue1350-transitive-none-deps/dep1/dub.sdl | 4 ++++ .../issue1350-transitive-none-deps/dep2/dep2.d | 0 .../issue1350-transitive-none-deps/dep2/dub.sdl | 4 ++++ .../issue1350-transitive-none-deps/dub.sdl | 5 +++++ .../issue1350-transitive-none-deps/test.config | 1 + .../issue1350-transitive-none-deps/test.d | 0 18 files changed, 23 insertions(+), 32 deletions(-) delete mode 100644 test/issue1350-transitive-none-deps/.gitignore delete mode 100644 test/issue1350-transitive-none-deps/.no_run delete mode 100644 test/issue1350-transitive-none-deps/.no_test delete mode 100644 test/issue1350-transitive-none-deps/common-none/dub.sdl delete mode 100644 test/issue1350-transitive-none-deps/dep1/dub.sdl delete mode 100644 test/issue1350-transitive-none-deps/dep2/dub.sdl delete mode 100644 test/issue1350-transitive-none-deps/dub.sdl create mode 100644 test/new_tests/issue1350-transitive-none-deps/.gitignore rename test/{ => new_tests}/issue1350-transitive-none-deps/common-dep/common.d (100%) rename test/{ => new_tests}/issue1350-transitive-none-deps/common-dep/dub.sdl (68%) create mode 100644 test/new_tests/issue1350-transitive-none-deps/common-none/dub.sdl rename test/{ => new_tests}/issue1350-transitive-none-deps/dep1/dep1.d (100%) create mode 100644 test/new_tests/issue1350-transitive-none-deps/dep1/dub.sdl rename test/{ => new_tests}/issue1350-transitive-none-deps/dep2/dep2.d (100%) create mode 100644 test/new_tests/issue1350-transitive-none-deps/dep2/dub.sdl create mode 100644 test/new_tests/issue1350-transitive-none-deps/dub.sdl create mode 100644 test/new_tests/issue1350-transitive-none-deps/test.config rename test/{ => new_tests}/issue1350-transitive-none-deps/test.d (100%) diff --git a/test/issue1350-transitive-none-deps/.gitignore b/test/issue1350-transitive-none-deps/.gitignore deleted file mode 100644 index 4571d26027..0000000000 --- a/test/issue1350-transitive-none-deps/.gitignore +++ /dev/null @@ -1,15 +0,0 @@ -.dub -docs.json -__dummy.html -docs/ -test -test.so -test.dylib -test.dll -test.a -test.lib -test-test-* -*.exe -*.o -*.obj -*.lst diff --git a/test/issue1350-transitive-none-deps/.no_run b/test/issue1350-transitive-none-deps/.no_run deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/issue1350-transitive-none-deps/.no_test b/test/issue1350-transitive-none-deps/.no_test deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/issue1350-transitive-none-deps/common-none/dub.sdl b/test/issue1350-transitive-none-deps/common-none/dub.sdl deleted file mode 100644 index 79986cc395..0000000000 --- a/test/issue1350-transitive-none-deps/common-none/dub.sdl +++ /dev/null @@ -1,3 +0,0 @@ -name "common-none" -targetType "none" -dependency "common-dep" path="../common-dep" diff --git a/test/issue1350-transitive-none-deps/dep1/dub.sdl b/test/issue1350-transitive-none-deps/dep1/dub.sdl deleted file mode 100644 index 432097ae2c..0000000000 --- a/test/issue1350-transitive-none-deps/dep1/dub.sdl +++ /dev/null @@ -1,4 +0,0 @@ -name "dep1" -importPaths "." -sourceFiles "dep1.d" -dependency "common-none" path="../common-none" diff --git a/test/issue1350-transitive-none-deps/dep2/dub.sdl b/test/issue1350-transitive-none-deps/dep2/dub.sdl deleted file mode 100644 index 3157e086b7..0000000000 --- a/test/issue1350-transitive-none-deps/dep2/dub.sdl +++ /dev/null @@ -1,4 +0,0 @@ -name "dep2" -importPaths "." -sourceFiles "dep2.d" -dependency "common-none" path="../common-none" diff --git a/test/issue1350-transitive-none-deps/dub.sdl b/test/issue1350-transitive-none-deps/dub.sdl deleted file mode 100644 index 5bcd9407c0..0000000000 --- a/test/issue1350-transitive-none-deps/dub.sdl +++ /dev/null @@ -1,5 +0,0 @@ -name "test" -targetType "executable" -sourceFiles "test.d" -dependency "dep1" path="dep1" -dependency "dep2" path="dep2" diff --git a/test/new_tests/issue1350-transitive-none-deps/.gitignore b/test/new_tests/issue1350-transitive-none-deps/.gitignore new file mode 100644 index 0000000000..7b19ef120a --- /dev/null +++ b/test/new_tests/issue1350-transitive-none-deps/.gitignore @@ -0,0 +1,5 @@ +!/common-dep/ +!/common-none/ +!/dep1 +!/dep2 +!/test.d diff --git a/test/issue1350-transitive-none-deps/common-dep/common.d b/test/new_tests/issue1350-transitive-none-deps/common-dep/common.d similarity index 100% rename from test/issue1350-transitive-none-deps/common-dep/common.d rename to test/new_tests/issue1350-transitive-none-deps/common-dep/common.d diff --git a/test/issue1350-transitive-none-deps/common-dep/dub.sdl b/test/new_tests/issue1350-transitive-none-deps/common-dep/dub.sdl similarity index 68% rename from test/issue1350-transitive-none-deps/common-dep/dub.sdl rename to test/new_tests/issue1350-transitive-none-deps/common-dep/dub.sdl index e4d29b2412..a6b7bb7df3 100644 --- a/test/issue1350-transitive-none-deps/common-dep/dub.sdl +++ b/test/new_tests/issue1350-transitive-none-deps/common-dep/dub.sdl @@ -1,4 +1,4 @@ -name "common-dep" +name "issue1350-common-dep" targetType "library" importPaths "." sourceFiles "common.d" diff --git a/test/new_tests/issue1350-transitive-none-deps/common-none/dub.sdl b/test/new_tests/issue1350-transitive-none-deps/common-none/dub.sdl new file mode 100644 index 0000000000..70d7315878 --- /dev/null +++ b/test/new_tests/issue1350-transitive-none-deps/common-none/dub.sdl @@ -0,0 +1,3 @@ +name "issue1350-common-none" +targetType "none" +dependency "issue1350-common-dep" path="../common-dep" diff --git a/test/issue1350-transitive-none-deps/dep1/dep1.d b/test/new_tests/issue1350-transitive-none-deps/dep1/dep1.d similarity index 100% rename from test/issue1350-transitive-none-deps/dep1/dep1.d rename to test/new_tests/issue1350-transitive-none-deps/dep1/dep1.d diff --git a/test/new_tests/issue1350-transitive-none-deps/dep1/dub.sdl b/test/new_tests/issue1350-transitive-none-deps/dep1/dub.sdl new file mode 100644 index 0000000000..ba412736be --- /dev/null +++ b/test/new_tests/issue1350-transitive-none-deps/dep1/dub.sdl @@ -0,0 +1,4 @@ +name "issue1350-dep1" +importPaths "." +sourceFiles "dep1.d" +dependency "issue1350-common-none" path="../common-none" diff --git a/test/issue1350-transitive-none-deps/dep2/dep2.d b/test/new_tests/issue1350-transitive-none-deps/dep2/dep2.d similarity index 100% rename from test/issue1350-transitive-none-deps/dep2/dep2.d rename to test/new_tests/issue1350-transitive-none-deps/dep2/dep2.d diff --git a/test/new_tests/issue1350-transitive-none-deps/dep2/dub.sdl b/test/new_tests/issue1350-transitive-none-deps/dep2/dub.sdl new file mode 100644 index 0000000000..d6ad8b82fc --- /dev/null +++ b/test/new_tests/issue1350-transitive-none-deps/dep2/dub.sdl @@ -0,0 +1,4 @@ +name "issue1350-dep2" +importPaths "." +sourceFiles "dep2.d" +dependency "issue1350-common-none" path="../common-none" diff --git a/test/new_tests/issue1350-transitive-none-deps/dub.sdl b/test/new_tests/issue1350-transitive-none-deps/dub.sdl new file mode 100644 index 0000000000..1b948e60df --- /dev/null +++ b/test/new_tests/issue1350-transitive-none-deps/dub.sdl @@ -0,0 +1,5 @@ +name "issue1350-transitive-none-depss" +targetType "executable" +sourceFiles "test.d" +dependency "issue1350-dep1" path="dep1" +dependency "issue1350-dep2" path="dep2" diff --git a/test/new_tests/issue1350-transitive-none-deps/test.config b/test/new_tests/issue1350-transitive-none-deps/test.config new file mode 100644 index 0000000000..32efffa32d --- /dev/null +++ b/test/new_tests/issue1350-transitive-none-deps/test.config @@ -0,0 +1 @@ +dub_command = build diff --git a/test/issue1350-transitive-none-deps/test.d b/test/new_tests/issue1350-transitive-none-deps/test.d similarity index 100% rename from test/issue1350-transitive-none-deps/test.d rename to test/new_tests/issue1350-transitive-none-deps/test.d From ae14697d626d4b98a913c3380925da72468c26fb Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 19 Jul 2025 19:46:53 +0300 Subject: [PATCH 083/187] issue1372-ignore-files-in-hidden-dirs Signed-off-by: Andrei Horodniceanu --- test/issue1372-ignore-files-in-hidden-dirs.sh | 37 ------------------- .../.gitignore | 6 +++ .../dub.json | 8 ++++ .../sample}/.hiddensource/hello.d | 0 .../sample}/dub.json | 0 .../sample}/source/.AppleDouble/app.d | 0 .../sample}/source/.compileMe/hello.d | 0 .../sample}/source/app.d | 0 .../source/app.d | 25 +++++++++++++ 9 files changed, 39 insertions(+), 37 deletions(-) delete mode 100755 test/issue1372-ignore-files-in-hidden-dirs.sh create mode 100644 test/new_tests/issue1372-ignore-files-in-hidden-dirs/.gitignore create mode 100644 test/new_tests/issue1372-ignore-files-in-hidden-dirs/dub.json rename test/{issue1372-ignore-files-in-hidden-dirs => new_tests/issue1372-ignore-files-in-hidden-dirs/sample}/.hiddensource/hello.d (100%) rename test/{issue1372-ignore-files-in-hidden-dirs => new_tests/issue1372-ignore-files-in-hidden-dirs/sample}/dub.json (100%) rename test/{issue1372-ignore-files-in-hidden-dirs => new_tests/issue1372-ignore-files-in-hidden-dirs/sample}/source/.AppleDouble/app.d (100%) rename test/{issue1372-ignore-files-in-hidden-dirs => new_tests/issue1372-ignore-files-in-hidden-dirs/sample}/source/.compileMe/hello.d (100%) rename test/{issue1372-ignore-files-in-hidden-dirs => new_tests/issue1372-ignore-files-in-hidden-dirs/sample}/source/app.d (100%) create mode 100644 test/new_tests/issue1372-ignore-files-in-hidden-dirs/source/app.d diff --git a/test/issue1372-ignore-files-in-hidden-dirs.sh b/test/issue1372-ignore-files-in-hidden-dirs.sh deleted file mode 100755 index f4560e9832..0000000000 --- a/test/issue1372-ignore-files-in-hidden-dirs.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env bash - -set -e - -. $(dirname "${BASH_SOURCE[0]}")/common.sh - - -BASEDIR=${CURR_DIR}/issue1372-ignore-files-in-hidden-dirs -rm -rf ${BASEDIR}/.dub -rm -rf ${BASEDIR}/issue1372 - -echo "Compile and ignore hidden directories" -${DUB} build --root ${BASEDIR} --config=normal --force -OUTPUT=`${BASEDIR}/issue1372` -if [[ "$OUTPUT" != "no hidden file compiled" ]]; then die $LINENO "Normal compilation failed"; fi - -rm -rf ${BASEDIR}/.dub -rm -rf ${BASEDIR}/issue1372 - - -echo "Compile and explcitly include file in hidden directories" -${DUB} build --root ${BASEDIR} --config=hiddenfile --force -OUTPUT=`${BASEDIR}/issue1372` - -if [[ "$OUTPUT" != "hidden file compiled" ]]; then die $LINENO "Hidden file compilation failed"; fi - -rm -rf ${BASEDIR}/.dub -rm -rf ${BASEDIR}/issue1372 - -echo "Compile and explcitly include extra hidden directories" -${DUB} build --root ${BASEDIR} --config=hiddendir --force -OUTPUT=`${BASEDIR}/issue1372` - -if [[ "$OUTPUT" != "hidden dir compiled" ]]; then die $LINENO "Hidden directory compilation failed"; fi - -rm -rf ${BASEDIR}/.dub -rm -rf ${BASEDIR}/issue1372 diff --git a/test/new_tests/issue1372-ignore-files-in-hidden-dirs/.gitignore b/test/new_tests/issue1372-ignore-files-in-hidden-dirs/.gitignore new file mode 100644 index 0000000000..bf44e1c41e --- /dev/null +++ b/test/new_tests/issue1372-ignore-files-in-hidden-dirs/.gitignore @@ -0,0 +1,6 @@ +sample/* +!sample/ +!sample/dub.json +!sample/.hiddensource +!sample/source/ +!sample/source/* \ No newline at end of file diff --git a/test/new_tests/issue1372-ignore-files-in-hidden-dirs/dub.json b/test/new_tests/issue1372-ignore-files-in-hidden-dirs/dub.json new file mode 100644 index 0000000000..4c402c579a --- /dev/null +++ b/test/new_tests/issue1372-ignore-files-in-hidden-dirs/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue1372-ignore-files-in-hidden-dirs", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/issue1372-ignore-files-in-hidden-dirs/.hiddensource/hello.d b/test/new_tests/issue1372-ignore-files-in-hidden-dirs/sample/.hiddensource/hello.d similarity index 100% rename from test/issue1372-ignore-files-in-hidden-dirs/.hiddensource/hello.d rename to test/new_tests/issue1372-ignore-files-in-hidden-dirs/sample/.hiddensource/hello.d diff --git a/test/issue1372-ignore-files-in-hidden-dirs/dub.json b/test/new_tests/issue1372-ignore-files-in-hidden-dirs/sample/dub.json similarity index 100% rename from test/issue1372-ignore-files-in-hidden-dirs/dub.json rename to test/new_tests/issue1372-ignore-files-in-hidden-dirs/sample/dub.json diff --git a/test/issue1372-ignore-files-in-hidden-dirs/source/.AppleDouble/app.d b/test/new_tests/issue1372-ignore-files-in-hidden-dirs/sample/source/.AppleDouble/app.d similarity index 100% rename from test/issue1372-ignore-files-in-hidden-dirs/source/.AppleDouble/app.d rename to test/new_tests/issue1372-ignore-files-in-hidden-dirs/sample/source/.AppleDouble/app.d diff --git a/test/issue1372-ignore-files-in-hidden-dirs/source/.compileMe/hello.d b/test/new_tests/issue1372-ignore-files-in-hidden-dirs/sample/source/.compileMe/hello.d similarity index 100% rename from test/issue1372-ignore-files-in-hidden-dirs/source/.compileMe/hello.d rename to test/new_tests/issue1372-ignore-files-in-hidden-dirs/sample/source/.compileMe/hello.d diff --git a/test/issue1372-ignore-files-in-hidden-dirs/source/app.d b/test/new_tests/issue1372-ignore-files-in-hidden-dirs/sample/source/app.d similarity index 100% rename from test/issue1372-ignore-files-in-hidden-dirs/source/app.d rename to test/new_tests/issue1372-ignore-files-in-hidden-dirs/sample/source/app.d diff --git a/test/new_tests/issue1372-ignore-files-in-hidden-dirs/source/app.d b/test/new_tests/issue1372-ignore-files-in-hidden-dirs/source/app.d new file mode 100644 index 0000000000..55444cb7dc --- /dev/null +++ b/test/new_tests/issue1372-ignore-files-in-hidden-dirs/source/app.d @@ -0,0 +1,25 @@ +import common; + +import std.algorithm; +import std.process; +import std.file; + +void main () { + log("Compile and ignore hidden directories"); + auto p = teeProcess([dub, "run", "--root=sample", "--config=normal", "--force"]); + if (p.wait != 0) die("Dub run normal failed"); + if (!p.stdout.canFind("no hidden file compiled")) + die("Normal compilation failed"); + + log("compile and explicitly include file in hidden directories"); + p = teeProcess([dub, "run", "--root=sample", "--config=hiddenfile", "--force"]); + if (p.wait != 0) die("Dub run hiddenfile failed"); + if (!p.stdout.canFind("hidden file compiled")) + die("Hidden file compilation failed"); + + log("Compile and explcitly include extra hidden directories"); + p = teeProcess([dub, "run", "--root=sample", "--config=hiddendir", "--force"]); + if (p.wait != 0) die("Dub run hiddendir failed"); + if (!p.stdout.canFind("hidden dir compiled")) + die("Hidden directory compilation failed"); +} From 910154f6338bfaf984166bedf0feeaf59d90d9d3 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 19 Jul 2025 19:52:40 +0300 Subject: [PATCH 084/187] issue1396-pre-post-run-commands Signed-off-by: Andrei Horodniceanu --- test/issue1396-pre-post-run-commands.sh | 15 --------------- test/issue1396-pre-post-run-commands/.no_build | 0 .../issue1396-pre-post-run-commands/.gitignore | 5 +++++ .../issue1396-pre-post-run-commands/dub.json | 8 ++++++++ .../sample}/dub.sdl | 0 .../sample}/post-run.sh | 0 .../sample}/source/app.d | 0 .../source/app.d | 18 ++++++++++++++++++ .../test.config | 1 + 9 files changed, 32 insertions(+), 15 deletions(-) delete mode 100755 test/issue1396-pre-post-run-commands.sh delete mode 100644 test/issue1396-pre-post-run-commands/.no_build create mode 100644 test/new_tests/issue1396-pre-post-run-commands/.gitignore create mode 100644 test/new_tests/issue1396-pre-post-run-commands/dub.json rename test/{issue1396-pre-post-run-commands => new_tests/issue1396-pre-post-run-commands/sample}/dub.sdl (100%) rename test/{issue1396-pre-post-run-commands => new_tests/issue1396-pre-post-run-commands/sample}/post-run.sh (100%) rename test/{issue1396-pre-post-run-commands => new_tests/issue1396-pre-post-run-commands/sample}/source/app.d (100%) create mode 100644 test/new_tests/issue1396-pre-post-run-commands/source/app.d create mode 100644 test/new_tests/issue1396-pre-post-run-commands/test.config diff --git a/test/issue1396-pre-post-run-commands.sh b/test/issue1396-pre-post-run-commands.sh deleted file mode 100755 index fdb797e257..0000000000 --- a/test/issue1396-pre-post-run-commands.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env bash - -. $(dirname "${BASH_SOURCE[0]}")/common.sh -cd ${CURR_DIR}/issue1396-pre-post-run-commands -rm -rf .dub -rm -rf test.txt -"$DUB" - -if ! grep -c -e "pre-run" test.txt; then - die $LINENO 'pre run not executed.' -fi - -if ! grep -c -e "post-run-0" test.txt; then - die $LINENO 'post run not executed.' -fi diff --git a/test/issue1396-pre-post-run-commands/.no_build b/test/issue1396-pre-post-run-commands/.no_build deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/new_tests/issue1396-pre-post-run-commands/.gitignore b/test/new_tests/issue1396-pre-post-run-commands/.gitignore new file mode 100644 index 0000000000..ef4d6125f0 --- /dev/null +++ b/test/new_tests/issue1396-pre-post-run-commands/.gitignore @@ -0,0 +1,5 @@ +/sample/* +!/sample/ +!/sample/dub.sdl +!/sample/post-run.sh +!/sample/source/ \ No newline at end of file diff --git a/test/new_tests/issue1396-pre-post-run-commands/dub.json b/test/new_tests/issue1396-pre-post-run-commands/dub.json new file mode 100644 index 0000000000..88edd55401 --- /dev/null +++ b/test/new_tests/issue1396-pre-post-run-commands/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue1396-pre-post-run-commands", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/issue1396-pre-post-run-commands/dub.sdl b/test/new_tests/issue1396-pre-post-run-commands/sample/dub.sdl similarity index 100% rename from test/issue1396-pre-post-run-commands/dub.sdl rename to test/new_tests/issue1396-pre-post-run-commands/sample/dub.sdl diff --git a/test/issue1396-pre-post-run-commands/post-run.sh b/test/new_tests/issue1396-pre-post-run-commands/sample/post-run.sh similarity index 100% rename from test/issue1396-pre-post-run-commands/post-run.sh rename to test/new_tests/issue1396-pre-post-run-commands/sample/post-run.sh diff --git a/test/issue1396-pre-post-run-commands/source/app.d b/test/new_tests/issue1396-pre-post-run-commands/sample/source/app.d similarity index 100% rename from test/issue1396-pre-post-run-commands/source/app.d rename to test/new_tests/issue1396-pre-post-run-commands/sample/source/app.d diff --git a/test/new_tests/issue1396-pre-post-run-commands/source/app.d b/test/new_tests/issue1396-pre-post-run-commands/source/app.d new file mode 100644 index 0000000000..ef09671c5e --- /dev/null +++ b/test/new_tests/issue1396-pre-post-run-commands/source/app.d @@ -0,0 +1,18 @@ +import common; + +import std.algorithm; +import std.process; +import std.file; + +void main () { + if ("sample/text.txt".exists) remove("sample/test.txt"); + + if (spawnProcess(dub, null, Config.none, "sample").wait) + die("Dub run failed"); + + immutable got = readText("sample/test.txt"); + if (!got.canFind("pre-run")) + die("pre run not executed."); + if (!got.canFind("post-run-0")) + die("post run not executed."); +} diff --git a/test/new_tests/issue1396-pre-post-run-commands/test.config b/test/new_tests/issue1396-pre-post-run-commands/test.config new file mode 100644 index 0000000000..76a192f538 --- /dev/null +++ b/test/new_tests/issue1396-pre-post-run-commands/test.config @@ -0,0 +1 @@ +os = [linux, osx] \ No newline at end of file From 48094ff90be0f9d21f8888d6edb767ddde6c0712 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 19 Jul 2025 20:03:31 +0300 Subject: [PATCH 085/187] issue1401-file-system-pkg-supplier Signed-off-by: Andrei Horodniceanu --- .../.no_build | 0 test/issue1401-filesystem-supplier.sh | 28 ---------------- .../.gitignore | 1 + .../dub.json | 8 +++++ .../sample}/fs-json-dubpackage-1.0.7.zip | Bin .../sample}/fs-sdl-dubpackage-1.0.5.zip | Bin .../sample}/fs-sdl-dubpackage-1.0.6.zip | Bin .../source/app.d | 31 ++++++++++++++++++ 8 files changed, 40 insertions(+), 28 deletions(-) delete mode 100644 test/issue1401-file-system-pkg-supplier/.no_build delete mode 100755 test/issue1401-filesystem-supplier.sh create mode 100644 test/new_tests/issue1401-file-system-pkg-supplier/.gitignore create mode 100644 test/new_tests/issue1401-file-system-pkg-supplier/dub.json rename test/{issue1401-file-system-pkg-supplier => new_tests/issue1401-file-system-pkg-supplier/sample}/fs-json-dubpackage-1.0.7.zip (100%) rename test/{issue1401-file-system-pkg-supplier => new_tests/issue1401-file-system-pkg-supplier/sample}/fs-sdl-dubpackage-1.0.5.zip (100%) rename test/{issue1401-file-system-pkg-supplier => new_tests/issue1401-file-system-pkg-supplier/sample}/fs-sdl-dubpackage-1.0.6.zip (100%) create mode 100644 test/new_tests/issue1401-file-system-pkg-supplier/source/app.d diff --git a/test/issue1401-file-system-pkg-supplier/.no_build b/test/issue1401-file-system-pkg-supplier/.no_build deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/issue1401-filesystem-supplier.sh b/test/issue1401-filesystem-supplier.sh deleted file mode 100755 index 18d1fcd8c3..0000000000 --- a/test/issue1401-filesystem-supplier.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env bash -DIR=$(dirname "${BASH_SOURCE[0]}") - -. "$DIR"/common.sh - -${DUB} remove fs-json-dubpackage --non-interactive 2>/dev/null || true -${DUB} remove fs-sdl-dubpackage --non-interactive 2>/dev/null || true - -echo "Trying to get fs-sdl-dubpackage (1.0.5)" -${DUB} fetch fs-sdl-dubpackage --version=1.0.5 --skip-registry=all --registry=file://"$DIR"/issue1401-file-system-pkg-supplier - -if ! ${DUB} remove fs-sdl-dubpackage@1.0.5 2>/dev/null; then - die $LINENO 'DUB did not install package from file system.' -fi - -echo "Trying to get fs-sdl-dubpackage (latest)" -${DUB} fetch fs-sdl-dubpackage --skip-registry=all --registry=file://"$DIR"/issue1401-file-system-pkg-supplier - -if ! ${DUB} remove fs-sdl-dubpackage@1.0.6 2>/dev/null; then - die $LINENO 'DUB did not install latest package from file system.' -fi - -echo "Trying to get fs-json-dubpackage (1.0.7)" -${DUB} fetch fs-json-dubpackage@1.0.7 --skip-registry=all --registry=file://"$DIR"/issue1401-file-system-pkg-supplier - -if ! ${DUB} remove fs-json-dubpackage@1.0.7 2>/dev/null; then - die $LINENO 'DUB did not install package from file system.' -fi diff --git a/test/new_tests/issue1401-file-system-pkg-supplier/.gitignore b/test/new_tests/issue1401-file-system-pkg-supplier/.gitignore new file mode 100644 index 0000000000..911c163398 --- /dev/null +++ b/test/new_tests/issue1401-file-system-pkg-supplier/.gitignore @@ -0,0 +1 @@ +!/sample/ diff --git a/test/new_tests/issue1401-file-system-pkg-supplier/dub.json b/test/new_tests/issue1401-file-system-pkg-supplier/dub.json new file mode 100644 index 0000000000..e957f6fbf0 --- /dev/null +++ b/test/new_tests/issue1401-file-system-pkg-supplier/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue1401-file-system-pkg-supplier", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/issue1401-file-system-pkg-supplier/fs-json-dubpackage-1.0.7.zip b/test/new_tests/issue1401-file-system-pkg-supplier/sample/fs-json-dubpackage-1.0.7.zip similarity index 100% rename from test/issue1401-file-system-pkg-supplier/fs-json-dubpackage-1.0.7.zip rename to test/new_tests/issue1401-file-system-pkg-supplier/sample/fs-json-dubpackage-1.0.7.zip diff --git a/test/issue1401-file-system-pkg-supplier/fs-sdl-dubpackage-1.0.5.zip b/test/new_tests/issue1401-file-system-pkg-supplier/sample/fs-sdl-dubpackage-1.0.5.zip similarity index 100% rename from test/issue1401-file-system-pkg-supplier/fs-sdl-dubpackage-1.0.5.zip rename to test/new_tests/issue1401-file-system-pkg-supplier/sample/fs-sdl-dubpackage-1.0.5.zip diff --git a/test/issue1401-file-system-pkg-supplier/fs-sdl-dubpackage-1.0.6.zip b/test/new_tests/issue1401-file-system-pkg-supplier/sample/fs-sdl-dubpackage-1.0.6.zip similarity index 100% rename from test/issue1401-file-system-pkg-supplier/fs-sdl-dubpackage-1.0.6.zip rename to test/new_tests/issue1401-file-system-pkg-supplier/sample/fs-sdl-dubpackage-1.0.6.zip diff --git a/test/new_tests/issue1401-file-system-pkg-supplier/source/app.d b/test/new_tests/issue1401-file-system-pkg-supplier/source/app.d new file mode 100644 index 0000000000..8da397f7b6 --- /dev/null +++ b/test/new_tests/issue1401-file-system-pkg-supplier/source/app.d @@ -0,0 +1,31 @@ +import common; + +import std.algorithm; +import std.file; +import std.path; +import std.process; + +void main () { + foreach (pkg; ["fs-json-dubpackage", "fs-sdl-dubpackage"]) + execute([dub, "remove", pkg, "--non-interactive"]); + + immutable registryArgs = [ "--skip-registry=all", "--registry=file://" ~ getcwd() ~ "/sample" ]; + + log("Trying to get fs-sdl-dubpackage (1.0.5)"); + if (spawnProcess([dub, "fetch", "fs-sdl-dubpackage", "--version=1.0.5"] ~ registryArgs).wait != 0) + die("dub fetch failed"); + if (spawnProcess([dub, "remove", "fs-sdl-dubpackage@1.0.5"]).wait != 0) + die("DUB did not install package from file system."); + + log("Trying to get fs-sdl-dubpackage (latest)"); + if (spawnProcess([dub, "fetch", "fs-sdl-dubpackage"] ~ registryArgs).wait != 0) + die("dub fetch failed"); + if (spawnProcess([dub, "remove", "fs-sdl-dubpackage@1.0.6"]).wait != 0) + die("DUB did not install latest package from file system."); + + log("Trying to get fs-json-dubpackage (1.0.7)"); + if (spawnProcess([dub, "fetch", "fs-json-dubpackage@1.0.7"] ~ registryArgs).wait != 0) + die("dub fetch failed"); + if (spawnProcess([dub, "remove", "fs-json-dubpackage@1.0.7"]).wait != 0) + die("DUB did not install package from file system."); +} From 87539b1d354916c348bdbf2527f79116c69a0208 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 19 Jul 2025 20:04:51 +0300 Subject: [PATCH 086/187] issue1408-inherit-linker-files Signed-off-by: Andrei Horodniceanu --- test/issue1408-inherit-linker-files/.no_run | 0 test/issue1408-inherit-linker-files/.no_test | 0 test/new_tests/issue1408-inherit-linker-files/.gitignore | 3 +++ test/{ => new_tests}/issue1408-inherit-linker-files/dep.d | 0 test/{ => new_tests}/issue1408-inherit-linker-files/dub.sdl | 6 +++--- test/{ => new_tests}/issue1408-inherit-linker-files/lib.d | 0 .../issue1408-inherit-linker-files/lib/dub.sdl | 2 +- .../issue1408-inherit-linker-files/lib/lib.d | 0 test/{ => new_tests}/issue1408-inherit-linker-files/main.d | 0 test/new_tests/issue1408-inherit-linker-files/test.config | 1 + 10 files changed, 8 insertions(+), 4 deletions(-) delete mode 100644 test/issue1408-inherit-linker-files/.no_run delete mode 100644 test/issue1408-inherit-linker-files/.no_test create mode 100644 test/new_tests/issue1408-inherit-linker-files/.gitignore rename test/{ => new_tests}/issue1408-inherit-linker-files/dep.d (100%) rename test/{ => new_tests}/issue1408-inherit-linker-files/dub.sdl (61%) rename test/{ => new_tests}/issue1408-inherit-linker-files/lib.d (100%) rename test/{ => new_tests}/issue1408-inherit-linker-files/lib/dub.sdl (69%) rename test/{ => new_tests}/issue1408-inherit-linker-files/lib/lib.d (100%) rename test/{ => new_tests}/issue1408-inherit-linker-files/main.d (100%) create mode 100644 test/new_tests/issue1408-inherit-linker-files/test.config diff --git a/test/issue1408-inherit-linker-files/.no_run b/test/issue1408-inherit-linker-files/.no_run deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/issue1408-inherit-linker-files/.no_test b/test/issue1408-inherit-linker-files/.no_test deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/new_tests/issue1408-inherit-linker-files/.gitignore b/test/new_tests/issue1408-inherit-linker-files/.gitignore new file mode 100644 index 0000000000..2649a54269 --- /dev/null +++ b/test/new_tests/issue1408-inherit-linker-files/.gitignore @@ -0,0 +1,3 @@ +!/*.d +!/dub.sdl +!/lib/ \ No newline at end of file diff --git a/test/issue1408-inherit-linker-files/dep.d b/test/new_tests/issue1408-inherit-linker-files/dep.d similarity index 100% rename from test/issue1408-inherit-linker-files/dep.d rename to test/new_tests/issue1408-inherit-linker-files/dep.d diff --git a/test/issue1408-inherit-linker-files/dub.sdl b/test/new_tests/issue1408-inherit-linker-files/dub.sdl similarity index 61% rename from test/issue1408-inherit-linker-files/dub.sdl rename to test/new_tests/issue1408-inherit-linker-files/dub.sdl index d26b1c9309..284ecd7018 100644 --- a/test/issue1408-inherit-linker-files/dub.sdl +++ b/test/new_tests/issue1408-inherit-linker-files/dub.sdl @@ -1,4 +1,4 @@ -name "test" +name "issue1408-inherit-linker-files" targetType "executable" dependency ":dep" version="*" sourceFiles "main.d" @@ -8,7 +8,7 @@ importPaths "." subPackage { name "dep" sourceFiles "dep.d" - sourceFiles "lib/liblib.a" platform="posix" - sourceFiles "lib/lib.lib" platform="windows" + sourceFiles "lib/libissue1408-lib.a" platform="posix" + sourceFiles "lib/issue1408-lib.lib" platform="windows" preBuildCommands "$DUB_EXE build --root=\"$PACKAGE_DIR/lib\"" } diff --git a/test/issue1408-inherit-linker-files/lib.d b/test/new_tests/issue1408-inherit-linker-files/lib.d similarity index 100% rename from test/issue1408-inherit-linker-files/lib.d rename to test/new_tests/issue1408-inherit-linker-files/lib.d diff --git a/test/issue1408-inherit-linker-files/lib/dub.sdl b/test/new_tests/issue1408-inherit-linker-files/lib/dub.sdl similarity index 69% rename from test/issue1408-inherit-linker-files/lib/dub.sdl rename to test/new_tests/issue1408-inherit-linker-files/lib/dub.sdl index 0706e67df9..e82a430676 100644 --- a/test/issue1408-inherit-linker-files/lib/dub.sdl +++ b/test/new_tests/issue1408-inherit-linker-files/lib/dub.sdl @@ -1,3 +1,3 @@ -name "lib" +name "issue1408-lib" targetType "staticLibrary" sourceFiles "lib.d" diff --git a/test/issue1408-inherit-linker-files/lib/lib.d b/test/new_tests/issue1408-inherit-linker-files/lib/lib.d similarity index 100% rename from test/issue1408-inherit-linker-files/lib/lib.d rename to test/new_tests/issue1408-inherit-linker-files/lib/lib.d diff --git a/test/issue1408-inherit-linker-files/main.d b/test/new_tests/issue1408-inherit-linker-files/main.d similarity index 100% rename from test/issue1408-inherit-linker-files/main.d rename to test/new_tests/issue1408-inherit-linker-files/main.d diff --git a/test/new_tests/issue1408-inherit-linker-files/test.config b/test/new_tests/issue1408-inherit-linker-files/test.config new file mode 100644 index 0000000000..4c5009d257 --- /dev/null +++ b/test/new_tests/issue1408-inherit-linker-files/test.config @@ -0,0 +1 @@ +dub_command = build \ No newline at end of file From dc1f51e322923da37e9a7a5c691a7db67c34074d Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 19 Jul 2025 20:16:46 +0300 Subject: [PATCH 087/187] issue1416-maven-repo-pkg-supplier Signed-off-by: Andrei Horodniceanu --- test/issue1416-maven-repo-pkg-supplier.sh | 31 --------------- ...16-maven-repo-pkg-supplier.sh.min_frontend | 1 - .../dub.json | 11 ++++++ .../source/app.d | 38 +++++++++++++++++++ .../test.config | 2 + 5 files changed, 51 insertions(+), 32 deletions(-) delete mode 100755 test/issue1416-maven-repo-pkg-supplier.sh delete mode 100644 test/issue1416-maven-repo-pkg-supplier.sh.min_frontend create mode 100644 test/new_tests/issue1416-maven-repo-pkg-supplier/dub.json create mode 100644 test/new_tests/issue1416-maven-repo-pkg-supplier/source/app.d create mode 100644 test/new_tests/issue1416-maven-repo-pkg-supplier/test.config diff --git a/test/issue1416-maven-repo-pkg-supplier.sh b/test/issue1416-maven-repo-pkg-supplier.sh deleted file mode 100755 index 4b65f52187..0000000000 --- a/test/issue1416-maven-repo-pkg-supplier.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env bash -DIR=$(dirname "${BASH_SOURCE[0]}") - -. "$DIR"/common.sh - -PORT=$(getRandomPort) - -${DUB} remove maven-dubpackage --non-interactive 2>/dev/null || true - -${DUB} build --single "$DIR"/test_registry.d -"$DIR"/test_registry --folder="$DIR/issue1416-maven-repo-pkg-supplier" --port=$PORT & -PID=$! -sleep 1 -trap 'kill $PID 2>/dev/null || true' exit - -echo "Trying to download maven-dubpackage (1.0.5)" -${DUB} fetch maven-dubpackage@1.0.5 --skip-registry=all --registry=mvn+http://localhost:$PORT/maven/release/dubpackages - -if ! ${DUB} remove maven-dubpackage@1.0.5 2>/dev/null; then - die $LINENO 'DUB did not install package from maven registry.' -fi - -echo "Trying to download maven-dubpackage (latest)" -${DUB} fetch maven-dubpackage --skip-registry=all --registry=mvn+http://localhost:$PORT/maven/release/dubpackages - -if ! ${DUB} remove maven-dubpackage@1.0.6 2>/dev/null; then - die $LINENO 'DUB fetch did not install latest package from maven registry.' -fi - -echo "Trying to search (exact) maven-dubpackage" -${DUB} search maven-dubpackage --skip-registry=all --registry=mvn+http://localhost:$PORT/maven/release/dubpackages | grep -c "maven-dubpackage (1.0.6)" diff --git a/test/issue1416-maven-repo-pkg-supplier.sh.min_frontend b/test/issue1416-maven-repo-pkg-supplier.sh.min_frontend deleted file mode 100644 index 4817f99644..0000000000 --- a/test/issue1416-maven-repo-pkg-supplier.sh.min_frontend +++ /dev/null @@ -1 +0,0 @@ -2.077 diff --git a/test/new_tests/issue1416-maven-repo-pkg-supplier/dub.json b/test/new_tests/issue1416-maven-repo-pkg-supplier/dub.json new file mode 100644 index 0000000000..617f3dc872 --- /dev/null +++ b/test/new_tests/issue1416-maven-repo-pkg-supplier/dub.json @@ -0,0 +1,11 @@ +{ + "name": "issue1416-maven-repo-pkg-supplier", + "dependencies": { + "common": { + "path": "../common" + }, + "test_registry_helper": { + "path": "../extra/test_registry" + } + } +} diff --git a/test/new_tests/issue1416-maven-repo-pkg-supplier/source/app.d b/test/new_tests/issue1416-maven-repo-pkg-supplier/source/app.d new file mode 100644 index 0000000000..576b68ba08 --- /dev/null +++ b/test/new_tests/issue1416-maven-repo-pkg-supplier/source/app.d @@ -0,0 +1,38 @@ +import common; +import test_registry_helper; + +import std.algorithm; +import std.file; +import std.path; +import std.process; + +void main () { + auto testRegistry = TestRegistry("../extra/issue1416-maven-repo-pkg-supplier"); + immutable registryArgs = [ + "--skip-registry=all", + "--registry=mvn+http://localhost:" ~ testRegistry.port ~ "/maven/release/dubpackages", + ]; + + execute([dub, "remove", "maven-dubpackage", "--non-interactive"]); + + log("Trying to download maven-dubpackage (1.0.5)"); + + if (spawnProcess([dub, "fetch", "maven-dubpackage@1.0.5"] ~ registryArgs).wait != 0) + die("Dub fetch failed"); + if (spawnProcess([dub, "remove", "maven-dubpackage@1.0.5"]).wait != 0) + die("DUB did not install package from maven registry."); + + log("Trying to download maven-dubpackage (latest)"); + + if (spawnProcess([dub, "fetch", "maven-dubpackage"] ~ registryArgs).wait != 0) + die("Dub fetch failed"); + if (spawnProcess([dub, "remove", "maven-dubpackage@1.0.6"]).wait != 0) + die("DUB fetch did not install latest package from maven registry."); + + log("Trying to search (exact) maven-dubpackage"); + auto p = teeProcess([dub, "search", "maven-dubpackage"] ~ registryArgs); + if (p.wait != 0) + die("DUB search failed"); + if (!p.stdout.canFind("maven-dubpackage (1.0.6)")) + die("DUB search did not find the correct package"); +} diff --git a/test/new_tests/issue1416-maven-repo-pkg-supplier/test.config b/test/new_tests/issue1416-maven-repo-pkg-supplier/test.config new file mode 100644 index 0000000000..b034b4d269 --- /dev/null +++ b/test/new_tests/issue1416-maven-repo-pkg-supplier/test.config @@ -0,0 +1,2 @@ +locks = test_registry +dc_backend = [dmd, ldc] From 4d30c5a492fa280fbbb5cab6b94058ac0e752313 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 19 Jul 2025 20:19:02 +0300 Subject: [PATCH 088/187] issue1427-betterC Signed-off-by: Andrei Horodniceanu --- test/issue1427-betterC/.gitignore | 4 ---- test/issue1427-betterC/.min_frontend | 1 - test/issue1427-betterC/.no_run | 0 test/issue1427-betterC/.no_test | 0 test/issue1427-betterC/dub.json | 4 ---- test/new_tests/issue1427-betterC/dub.json | 4 ++++ test/{ => new_tests}/issue1427-betterC/source/app.d | 0 7 files changed, 4 insertions(+), 9 deletions(-) delete mode 100644 test/issue1427-betterC/.gitignore delete mode 100644 test/issue1427-betterC/.min_frontend delete mode 100644 test/issue1427-betterC/.no_run delete mode 100644 test/issue1427-betterC/.no_test delete mode 100644 test/issue1427-betterC/dub.json create mode 100644 test/new_tests/issue1427-betterC/dub.json rename test/{ => new_tests}/issue1427-betterC/source/app.d (100%) diff --git a/test/issue1427-betterC/.gitignore b/test/issue1427-betterC/.gitignore deleted file mode 100644 index 0fd9d379b1..0000000000 --- a/test/issue1427-betterC/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -test -*.o -*.exe -.dub \ No newline at end of file diff --git a/test/issue1427-betterC/.min_frontend b/test/issue1427-betterC/.min_frontend deleted file mode 100644 index 67aaf4ad8d..0000000000 --- a/test/issue1427-betterC/.min_frontend +++ /dev/null @@ -1 +0,0 @@ -2.078 diff --git a/test/issue1427-betterC/.no_run b/test/issue1427-betterC/.no_run deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/issue1427-betterC/.no_test b/test/issue1427-betterC/.no_test deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/issue1427-betterC/dub.json b/test/issue1427-betterC/dub.json deleted file mode 100644 index d6e9256637..0000000000 --- a/test/issue1427-betterC/dub.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "test", - "buildOptions": ["betterC"] -} \ No newline at end of file diff --git a/test/new_tests/issue1427-betterC/dub.json b/test/new_tests/issue1427-betterC/dub.json new file mode 100644 index 0000000000..c680ea4e30 --- /dev/null +++ b/test/new_tests/issue1427-betterC/dub.json @@ -0,0 +1,4 @@ +{ + "name": "issue1427-betterC", + "buildOptions": ["betterC"] +} diff --git a/test/issue1427-betterC/source/app.d b/test/new_tests/issue1427-betterC/source/app.d similarity index 100% rename from test/issue1427-betterC/source/app.d rename to test/new_tests/issue1427-betterC/source/app.d From 55f32633153a9d73f0810ff2ad1823bbff4c5e4e Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 19 Jul 2025 20:28:08 +0300 Subject: [PATCH 089/187] issue1447-build-settings-vars Signed-off-by: Andrei Horodniceanu --- test/issue1447-build-settings-vars.sh | 25 --------------- test/issue1447-build-settings-vars/.no_run | 0 test/issue1447-build-settings-vars/.no_test | 0 .../issue1447-build-settings-vars/.gitignore | 5 +++ .../issue1447-build-settings-vars/dub.json | 8 +++++ .../sample}/dub.json | 2 +- .../sample}/source/app.d | 0 .../sample}/view-aarch64/arch | 0 .../sample}/view-x86/arch | 0 .../sample}/view-x86_64/arch | 0 .../source/app.d | 31 +++++++++++++++++++ .../issue1447-build-settings-vars/test.config | 1 + 12 files changed, 46 insertions(+), 26 deletions(-) delete mode 100755 test/issue1447-build-settings-vars.sh delete mode 100644 test/issue1447-build-settings-vars/.no_run delete mode 100644 test/issue1447-build-settings-vars/.no_test create mode 100644 test/new_tests/issue1447-build-settings-vars/.gitignore create mode 100644 test/new_tests/issue1447-build-settings-vars/dub.json rename test/{issue1447-build-settings-vars => new_tests/issue1447-build-settings-vars/sample}/dub.json (96%) rename test/{issue1447-build-settings-vars => new_tests/issue1447-build-settings-vars/sample}/source/app.d (100%) rename test/{issue1447-build-settings-vars => new_tests/issue1447-build-settings-vars/sample}/view-aarch64/arch (100%) rename test/{issue1447-build-settings-vars => new_tests/issue1447-build-settings-vars/sample}/view-x86/arch (100%) rename test/{issue1447-build-settings-vars => new_tests/issue1447-build-settings-vars/sample}/view-x86_64/arch (100%) create mode 100644 test/new_tests/issue1447-build-settings-vars/source/app.d create mode 100644 test/new_tests/issue1447-build-settings-vars/test.config diff --git a/test/issue1447-build-settings-vars.sh b/test/issue1447-build-settings-vars.sh deleted file mode 100755 index f06a7fa040..0000000000 --- a/test/issue1447-build-settings-vars.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env bash -set -e - -. $(dirname "${BASH_SOURCE[0]}")/common.sh - -if [[ `uname -m` == "i386" ]]; then - ARCH=x86 -elif [[ `uname -m` == "i686" ]]; then - ARCH=x86 -elif [[ `uname -m` == "arm64" ]]; then - ARCH="aarch64" -else - ARCH=$(uname -m) -fi - -rm -rf ${CURR_DIR}/issue1447-build-settings-vars/.dub -rm -rf ${CURR_DIR}/issue1447-build-settings-vars/test - -${DUB} build --root ${CURR_DIR}/issue1447-build-settings-vars --arch=$ARCH -OUTPUT=`${CURR_DIR}/issue1447-build-settings-vars/test` - -rm -rf ${CURR_DIR}/issue1447-build-settings-vars/.dub -rm -rf ${CURR_DIR}/issue1447-build-settings-vars/test - -if [[ "$OUTPUT" != "$ARCH" ]]; then die $LINENO "Build settings ARCH var incorrect"; fi diff --git a/test/issue1447-build-settings-vars/.no_run b/test/issue1447-build-settings-vars/.no_run deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/issue1447-build-settings-vars/.no_test b/test/issue1447-build-settings-vars/.no_test deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/new_tests/issue1447-build-settings-vars/.gitignore b/test/new_tests/issue1447-build-settings-vars/.gitignore new file mode 100644 index 0000000000..33a972a236 --- /dev/null +++ b/test/new_tests/issue1447-build-settings-vars/.gitignore @@ -0,0 +1,5 @@ +/sample/* +!/sample/ +!/sample/dub.json +!/sample/source/ +!/sample/view-*/ diff --git a/test/new_tests/issue1447-build-settings-vars/dub.json b/test/new_tests/issue1447-build-settings-vars/dub.json new file mode 100644 index 0000000000..42cf2eb264 --- /dev/null +++ b/test/new_tests/issue1447-build-settings-vars/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue1447-build-settings-vars", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/issue1447-build-settings-vars/dub.json b/test/new_tests/issue1447-build-settings-vars/sample/dub.json similarity index 96% rename from test/issue1447-build-settings-vars/dub.json rename to test/new_tests/issue1447-build-settings-vars/sample/dub.json index 9f5d345d4e..38165d43e9 100644 --- a/test/issue1447-build-settings-vars/dub.json +++ b/test/new_tests/issue1447-build-settings-vars/sample/dub.json @@ -1,4 +1,4 @@ { "name": "test", "stringImportPaths": ["view-$ARCH"] -} \ No newline at end of file +} diff --git a/test/issue1447-build-settings-vars/source/app.d b/test/new_tests/issue1447-build-settings-vars/sample/source/app.d similarity index 100% rename from test/issue1447-build-settings-vars/source/app.d rename to test/new_tests/issue1447-build-settings-vars/sample/source/app.d diff --git a/test/issue1447-build-settings-vars/view-aarch64/arch b/test/new_tests/issue1447-build-settings-vars/sample/view-aarch64/arch similarity index 100% rename from test/issue1447-build-settings-vars/view-aarch64/arch rename to test/new_tests/issue1447-build-settings-vars/sample/view-aarch64/arch diff --git a/test/issue1447-build-settings-vars/view-x86/arch b/test/new_tests/issue1447-build-settings-vars/sample/view-x86/arch similarity index 100% rename from test/issue1447-build-settings-vars/view-x86/arch rename to test/new_tests/issue1447-build-settings-vars/sample/view-x86/arch diff --git a/test/issue1447-build-settings-vars/view-x86_64/arch b/test/new_tests/issue1447-build-settings-vars/sample/view-x86_64/arch similarity index 100% rename from test/issue1447-build-settings-vars/view-x86_64/arch rename to test/new_tests/issue1447-build-settings-vars/sample/view-x86_64/arch diff --git a/test/new_tests/issue1447-build-settings-vars/source/app.d b/test/new_tests/issue1447-build-settings-vars/source/app.d new file mode 100644 index 0000000000..09cbe51b32 --- /dev/null +++ b/test/new_tests/issue1447-build-settings-vars/source/app.d @@ -0,0 +1,31 @@ +import common; + +import std.algorithm; +import std.file; +import std.path; +import std.process; +import std.string; + +void main () { + version(AArch64) + if (environment["DC"].baseName.canFind("ldmd")) + skip("dub doesn't allow passing `-arch aarch64` to ldmd2"); + + chdir("sample"); + + auto arch = execute(["uname", "-m"]).output.strip; + if (arch == "i386") + arch = "x86"; + if (arch == "i686") + arch = "x86"; + if (arch == "arm64") + arch = "aarch64"; + + if (spawnProcess([dub, "build", "--arch=" ~ arch]).wait != 0) + die("Dub build failed"); + auto p = teeProcess(["./test"]); + p.wait; + immutable output = p.stdout.chomp; + if (output != arch) + die("Build settings ARCH was incorrect. Expected ", arch, " got ", output); +} diff --git a/test/new_tests/issue1447-build-settings-vars/test.config b/test/new_tests/issue1447-build-settings-vars/test.config new file mode 100644 index 0000000000..3075fc310d --- /dev/null +++ b/test/new_tests/issue1447-build-settings-vars/test.config @@ -0,0 +1 @@ +os = [linux, osx] From 3a38f9f6fdd8108e5eaa9e614ae7d6c8a13eafe3 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 19 Jul 2025 20:40:12 +0300 Subject: [PATCH 090/187] issue1474-generate-source Signed-off-by: Andrei Horodniceanu --- test/issue1474-generate-source.script.d | 29 ------------------- test/issue1474/.no_build | 0 .../issue1474-generate-source/.gitignore | 7 +++++ .../issue1474-generate-source/dub.json | 9 ++++++ .../sample}/dub.json | 0 .../sample}/ext/kekw.d | 0 .../sample}/source/app.d | 0 .../issue1474-generate-source/source/app.d | 16 ++++++++++ 8 files changed, 32 insertions(+), 29 deletions(-) delete mode 100644 test/issue1474-generate-source.script.d delete mode 100644 test/issue1474/.no_build create mode 100644 test/new_tests/issue1474-generate-source/.gitignore create mode 100644 test/new_tests/issue1474-generate-source/dub.json rename test/{issue1474 => new_tests/issue1474-generate-source/sample}/dub.json (100%) rename test/{issue1474 => new_tests/issue1474-generate-source/sample}/ext/kekw.d (100%) rename test/{issue1474 => new_tests/issue1474-generate-source/sample}/source/app.d (100%) create mode 100644 test/new_tests/issue1474-generate-source/source/app.d diff --git a/test/issue1474-generate-source.script.d b/test/issue1474-generate-source.script.d deleted file mode 100644 index d345f58437..0000000000 --- a/test/issue1474-generate-source.script.d +++ /dev/null @@ -1,29 +0,0 @@ -/+ dub.sdl: - name "issue1474-generate-source" -+/ - -module issue1474_generate_source; - -import std.process; -import std.stdio; -import std.algorithm; -import std.path; - -int main() -{ - const dub = environment.get("DUB", buildPath(__FILE_FULL_PATH__.dirName.dirName, "bin", "dub")); - const curr_dir = environment.get("CURR_DIR", buildPath(__FILE_FULL_PATH__.dirName)); - const dc = environment.get("DC", "dmd"); - const cmd = [dub, "build", "--compiler", dc]; - const result = execute(cmd, null, Config.none, size_t.max, curr_dir.buildPath("issue1474")); - if (result.status || result.output.canFind("Failed")) - { - writefln("\n> %-(%s %)", cmd); - writeln("==========================================================="); - writeln(result.output); - writeln("==========================================================="); - writeln("Last command failed with exit code ", result.status, '\n'); - return 1; - } - return 0; -} diff --git a/test/issue1474/.no_build b/test/issue1474/.no_build deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/new_tests/issue1474-generate-source/.gitignore b/test/new_tests/issue1474-generate-source/.gitignore new file mode 100644 index 0000000000..6b0d66d00a --- /dev/null +++ b/test/new_tests/issue1474-generate-source/.gitignore @@ -0,0 +1,7 @@ +/sample/** +!/sample/ +!/sample/dub.json +!/sample/source/ +!/sample/source/*.d +!/sample/ext/ +!/sample/ext/kekw.d \ No newline at end of file diff --git a/test/new_tests/issue1474-generate-source/dub.json b/test/new_tests/issue1474-generate-source/dub.json new file mode 100644 index 0000000000..7f87a9620e --- /dev/null +++ b/test/new_tests/issue1474-generate-source/dub.json @@ -0,0 +1,9 @@ +{ + "name": "issue1474-generate-source", + "targetType": "executable", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/issue1474/dub.json b/test/new_tests/issue1474-generate-source/sample/dub.json similarity index 100% rename from test/issue1474/dub.json rename to test/new_tests/issue1474-generate-source/sample/dub.json diff --git a/test/issue1474/ext/kekw.d b/test/new_tests/issue1474-generate-source/sample/ext/kekw.d similarity index 100% rename from test/issue1474/ext/kekw.d rename to test/new_tests/issue1474-generate-source/sample/ext/kekw.d diff --git a/test/issue1474/source/app.d b/test/new_tests/issue1474-generate-source/sample/source/app.d similarity index 100% rename from test/issue1474/source/app.d rename to test/new_tests/issue1474-generate-source/sample/source/app.d diff --git a/test/new_tests/issue1474-generate-source/source/app.d b/test/new_tests/issue1474-generate-source/source/app.d new file mode 100644 index 0000000000..ee8dcf07aa --- /dev/null +++ b/test/new_tests/issue1474-generate-source/source/app.d @@ -0,0 +1,16 @@ +import common; + +import std.file; +import std.path; +import std.process; + +void main () { + chdir("sample"); + + immutable generatedFile = "ext/fortytwo.d"; + if (exists(generatedFile)) + remove(generatedFile); + + if (spawnProcess([dub, "build"]).wait != 0) + die("Dub failed to build with generated sources"); +} From eefaa8ef7d7bde0987ca0aced2bd34c3713b9ee6 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 19 Jul 2025 23:54:56 +0300 Subject: [PATCH 091/187] issue1477-subpackage-visuald-paths Signed-off-by: Andrei Horodniceanu --- test/issue1477-subpackage-visuald-paths.sh | 26 ---------- .../.no_build | 1 - .../.gitignore | 10 ++++ .../dub.json | 8 ++++ .../sample}/dub.sdl | 0 .../sample}/source/library.d | 0 .../sample}/sub/subpackage_a/dub.sdl | 0 .../sub/subpackage_a/source/subpackage_a.d | 0 .../source/app.d | 47 +++++++++++++++++++ 9 files changed, 65 insertions(+), 27 deletions(-) delete mode 100755 test/issue1477-subpackage-visuald-paths.sh delete mode 100644 test/issue1477-subpackage-visuald-paths/.no_build create mode 100644 test/new_tests/issue1477-subpackage-visuald-paths/.gitignore create mode 100644 test/new_tests/issue1477-subpackage-visuald-paths/dub.json rename test/{issue1477-subpackage-visuald-paths => new_tests/issue1477-subpackage-visuald-paths/sample}/dub.sdl (100%) rename test/{issue1477-subpackage-visuald-paths => new_tests/issue1477-subpackage-visuald-paths/sample}/source/library.d (100%) rename test/{issue1477-subpackage-visuald-paths => new_tests/issue1477-subpackage-visuald-paths/sample}/sub/subpackage_a/dub.sdl (100%) rename test/{issue1477-subpackage-visuald-paths => new_tests/issue1477-subpackage-visuald-paths/sample}/sub/subpackage_a/source/subpackage_a.d (100%) create mode 100644 test/new_tests/issue1477-subpackage-visuald-paths/source/app.d diff --git a/test/issue1477-subpackage-visuald-paths.sh b/test/issue1477-subpackage-visuald-paths.sh deleted file mode 100755 index 7f55bcfc7b..0000000000 --- a/test/issue1477-subpackage-visuald-paths.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash - -. $(dirname "${BASH_SOURCE[0]}")/common.sh -# Check project files generated from project "root" -cd ${CURR_DIR}/issue1477-subpackage-visuald-paths -rm -rf .dub -${DUB} generate visuald :subpackage_a -if ! grep " Date: Sun, 20 Jul 2025 15:54:37 +0300 Subject: [PATCH 092/187] issue1504-envvar-in-path Signed-off-by: Andrei Horodniceanu --- test/issue1504-envvar-in-path.sh | 19 ------------------ test/issue1504-envvar-in-path/.no_build | 0 .../issue1504-envvar-in-path/.gitignore | 7 +++++++ .../issue1504-envvar-in-path/dub.json | 8 ++++++++ .../issue1504-envvar-in-path/sample}/dub.json | 1 - .../sample}/source/app.d | 0 .../sample}/teststrings/message.txt | 0 .../issue1504-envvar-in-path/source/app.d | 20 +++++++++++++++++++ 8 files changed, 35 insertions(+), 20 deletions(-) delete mode 100755 test/issue1504-envvar-in-path.sh delete mode 100644 test/issue1504-envvar-in-path/.no_build create mode 100644 test/new_tests/issue1504-envvar-in-path/.gitignore create mode 100644 test/new_tests/issue1504-envvar-in-path/dub.json rename test/{issue1504-envvar-in-path => new_tests/issue1504-envvar-in-path/sample}/dub.json (98%) rename test/{issue1504-envvar-in-path => new_tests/issue1504-envvar-in-path/sample}/source/app.d (100%) rename test/{issue1504-envvar-in-path => new_tests/issue1504-envvar-in-path/sample}/teststrings/message.txt (100%) create mode 100644 test/new_tests/issue1504-envvar-in-path/source/app.d diff --git a/test/issue1504-envvar-in-path.sh b/test/issue1504-envvar-in-path.sh deleted file mode 100755 index 51cb80542d..0000000000 --- a/test/issue1504-envvar-in-path.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env bash -set -e - -. $(dirname "${BASH_SOURCE[0]}")/common.sh - -rm -rf ${CURR_DIR}/issue1504-envvar-in-path/.dub -rm -rf ${CURR_DIR}/issue1504-envvar-in-path/test -rm -rf ${CURR_DIR}/output-1504.txt - - -export MY_VARIABLE=teststrings -# pragma(msg) outputs to stderr -${DUB} build --force --root ${CURR_DIR}/issue1504-envvar-in-path 2> ${CURR_DIR}/output-1504.txt - -grep "env_variables_work" < ${CURR_DIR}/output-1504.txt - -# Don't manage to make it work -#grep "Invalid source" < ${CURR_DIR}/output-1504.txt && true - diff --git a/test/issue1504-envvar-in-path/.no_build b/test/issue1504-envvar-in-path/.no_build deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/new_tests/issue1504-envvar-in-path/.gitignore b/test/new_tests/issue1504-envvar-in-path/.gitignore new file mode 100644 index 0000000000..bf3d695758 --- /dev/null +++ b/test/new_tests/issue1504-envvar-in-path/.gitignore @@ -0,0 +1,7 @@ +/sample/** +!/sample/ +!/sample/dub.json +!/sample/source/ +!/sample/source/*.d +!/sample/teststrings/ +!/sample/teststrings/* diff --git a/test/new_tests/issue1504-envvar-in-path/dub.json b/test/new_tests/issue1504-envvar-in-path/dub.json new file mode 100644 index 0000000000..a3e8fe05bf --- /dev/null +++ b/test/new_tests/issue1504-envvar-in-path/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue1503-envvar-in-path", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/issue1504-envvar-in-path/dub.json b/test/new_tests/issue1504-envvar-in-path/sample/dub.json similarity index 98% rename from test/issue1504-envvar-in-path/dub.json rename to test/new_tests/issue1504-envvar-in-path/sample/dub.json index 1858aa64f3..0e05408505 100644 --- a/test/issue1504-envvar-in-path/dub.json +++ b/test/new_tests/issue1504-envvar-in-path/sample/dub.json @@ -2,4 +2,3 @@ "name": "test", "stringImportPaths": ["$MY_VARIABLE"] } - diff --git a/test/issue1504-envvar-in-path/source/app.d b/test/new_tests/issue1504-envvar-in-path/sample/source/app.d similarity index 100% rename from test/issue1504-envvar-in-path/source/app.d rename to test/new_tests/issue1504-envvar-in-path/sample/source/app.d diff --git a/test/issue1504-envvar-in-path/teststrings/message.txt b/test/new_tests/issue1504-envvar-in-path/sample/teststrings/message.txt similarity index 100% rename from test/issue1504-envvar-in-path/teststrings/message.txt rename to test/new_tests/issue1504-envvar-in-path/sample/teststrings/message.txt diff --git a/test/new_tests/issue1504-envvar-in-path/source/app.d b/test/new_tests/issue1504-envvar-in-path/source/app.d new file mode 100644 index 0000000000..77ad26bf76 --- /dev/null +++ b/test/new_tests/issue1504-envvar-in-path/source/app.d @@ -0,0 +1,20 @@ +import common; + +import std.algorithm; +import std.file; +import std.path; +import std.process; + +void main () { + auto p = teeProcess([dub, "build", "--force", "--root=sample"], + Redirect.stdout | Redirect.stderrToStdout, + ["MY_VARIABLE": "teststrings"]); + if (p.wait != 0) + die("Dub build failed"); + + if (!p.stdout.canFind("env_variables_work")) + die("couldn't find `env_variables_work` in dub build output"); + if (p.stdout.canFind("Invalid source")) + die("found `Invalid source` in dub build output"); + +} From 0c9be98105cddc424061e355ad325bc293bb34ac Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sun, 20 Jul 2025 16:00:57 +0300 Subject: [PATCH 093/187] issue1505-single-file-package-dynamic-library Signed-off-by: Andrei Horodniceanu --- ...505-single-file-package-dynamic-library.sh | 17 ------------- .../.gitignore | 1 + .../dub.json | 8 +++++++ .../sample.d} | 0 .../source/app.d | 24 +++++++++++++++++++ 5 files changed, 33 insertions(+), 17 deletions(-) delete mode 100755 test/issue1505-single-file-package-dynamic-library.sh create mode 100644 test/new_tests/issue1505-single-file-package-dynamic-library/.gitignore create mode 100644 test/new_tests/issue1505-single-file-package-dynamic-library/dub.json rename test/{issue1505-single-file-package-dynamic-library.d => new_tests/issue1505-single-file-package-dynamic-library/sample.d} (100%) create mode 100644 test/new_tests/issue1505-single-file-package-dynamic-library/source/app.d diff --git a/test/issue1505-single-file-package-dynamic-library.sh b/test/issue1505-single-file-package-dynamic-library.sh deleted file mode 100755 index 0a78b2072a..0000000000 --- a/test/issue1505-single-file-package-dynamic-library.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env bash -set -eux -o pipefail - -. $(dirname "${BASH_SOURCE[0]}")/common.sh -cd ${CURR_DIR} - -rm -f libsingle-file-test-dynamic-library.{so,dylib} -rm -f single-file-test-dynamic-library.dll - -${DUB} build --single issue1505-single-file-package-dynamic-library.d -if [[ ! -f libsingle-file-test-dynamic-library.so ]] \ -&& [[ ! -f libsingle-file-test-dynamic-library.dylib ]] \ -&& [[ ! -f single-file-test-dynamic-library.dll ]]; then - die $LINENO 'Normal invocation did not produce a dynamic library in the current directory' -fi -rm -f libsingle-file-test-dynamic-library.{so,dylib} -rm -f single-file-test-dynamic-library.dll diff --git a/test/new_tests/issue1505-single-file-package-dynamic-library/.gitignore b/test/new_tests/issue1505-single-file-package-dynamic-library/.gitignore new file mode 100644 index 0000000000..747c7b88e5 --- /dev/null +++ b/test/new_tests/issue1505-single-file-package-dynamic-library/.gitignore @@ -0,0 +1 @@ +!/sample.d diff --git a/test/new_tests/issue1505-single-file-package-dynamic-library/dub.json b/test/new_tests/issue1505-single-file-package-dynamic-library/dub.json new file mode 100644 index 0000000000..3fc843849c --- /dev/null +++ b/test/new_tests/issue1505-single-file-package-dynamic-library/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue1505-single-file-package-dynamic-library", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/issue1505-single-file-package-dynamic-library.d b/test/new_tests/issue1505-single-file-package-dynamic-library/sample.d similarity index 100% rename from test/issue1505-single-file-package-dynamic-library.d rename to test/new_tests/issue1505-single-file-package-dynamic-library/sample.d diff --git a/test/new_tests/issue1505-single-file-package-dynamic-library/source/app.d b/test/new_tests/issue1505-single-file-package-dynamic-library/source/app.d new file mode 100644 index 0000000000..2aa8cf1277 --- /dev/null +++ b/test/new_tests/issue1505-single-file-package-dynamic-library/source/app.d @@ -0,0 +1,24 @@ +import common; + +import std.algorithm; +import std.file; +import std.path; +import std.process; + +void main () { + immutable files = [ + "libsingle-file-test-dynamic-library.so", + "libsingle-file-test-dynamic-library.dylib", + "single-file-test-dynamic-library.dll", + ]; + foreach (file; files) + if (exists(file)) remove(file); + + if (spawnProcess([dub, "build", "--single", "sample.d"]).wait != 0) + die("Dub build failed"); + + foreach (file; files) + if (exists(file)) return; + + die("Normal invocation did not produce a dynamic library in the current directory"); +} From ca7f69af3a57fb9ec1beeb3dcb60c8ebcb549b6e Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sun, 20 Jul 2025 16:48:42 +0300 Subject: [PATCH 094/187] issue1524-maven-upgrade-dependency-tree Signed-off-by: Andrei Horodniceanu --- ...issue1524-maven-upgrade-dependency-tree.sh | 27 ----------------- ...en-upgrade-dependency-tree.sh.min_frontend | 1 - .../.gitignore | 8 ----- .../.no_build | 0 .../.gitignore | 7 +++++ .../dub.json | 11 +++++++ .../sample}/dub.json | 2 +- .../1.0.5/maven-dubpackage-a-1.0.5.zip | Bin .../maven-dubpackage-a/maven-metadata.xml | 0 .../1.0.6/maven-dubpackage-b-1.0.6.zip | Bin .../maven-dubpackage-b/maven-metadata.xml | 0 .../sample}/source/app.d | 0 .../source/app.d | 28 ++++++++++++++++++ .../test.config | 2 ++ 14 files changed, 49 insertions(+), 37 deletions(-) delete mode 100755 test/issue1524-maven-upgrade-dependency-tree.sh delete mode 100644 test/issue1524-maven-upgrade-dependency-tree.sh.min_frontend delete mode 100644 test/issue1524-maven-upgrade-dependency-tree/.gitignore delete mode 100644 test/issue1524-maven-upgrade-dependency-tree/.no_build create mode 100644 test/new_tests/issue1524-maven-upgrade-dependency-tree/.gitignore create mode 100644 test/new_tests/issue1524-maven-upgrade-dependency-tree/dub.json rename test/{issue1524-maven-upgrade-dependency-tree => new_tests/issue1524-maven-upgrade-dependency-tree/sample}/dub.json (97%) rename test/{issue1524-maven-upgrade-dependency-tree => new_tests/issue1524-maven-upgrade-dependency-tree/sample}/maven/release/dubpackages/maven-dubpackage-a/1.0.5/maven-dubpackage-a-1.0.5.zip (100%) rename test/{issue1524-maven-upgrade-dependency-tree => new_tests/issue1524-maven-upgrade-dependency-tree/sample}/maven/release/dubpackages/maven-dubpackage-a/maven-metadata.xml (100%) rename test/{issue1524-maven-upgrade-dependency-tree => new_tests/issue1524-maven-upgrade-dependency-tree/sample}/maven/release/dubpackages/maven-dubpackage-b/1.0.6/maven-dubpackage-b-1.0.6.zip (100%) rename test/{issue1524-maven-upgrade-dependency-tree => new_tests/issue1524-maven-upgrade-dependency-tree/sample}/maven/release/dubpackages/maven-dubpackage-b/maven-metadata.xml (100%) rename test/{issue1524-maven-upgrade-dependency-tree => new_tests/issue1524-maven-upgrade-dependency-tree/sample}/source/app.d (100%) create mode 100644 test/new_tests/issue1524-maven-upgrade-dependency-tree/source/app.d create mode 100644 test/new_tests/issue1524-maven-upgrade-dependency-tree/test.config diff --git a/test/issue1524-maven-upgrade-dependency-tree.sh b/test/issue1524-maven-upgrade-dependency-tree.sh deleted file mode 100755 index 05dd22ff6c..0000000000 --- a/test/issue1524-maven-upgrade-dependency-tree.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env bash -DIR=$(dirname "${BASH_SOURCE[0]}") - -. "$DIR"/common.sh - -PORT=$(getRandomPort) - -${DUB} remove maven-dubpackage-a --non-interactive 2>/dev/null || true -${DUB} remove maven-dubpackage-b --non-interactive 2>/dev/null || true - -${DUB} build --single "$DIR"/test_registry.d -"$DIR"/test_registry --folder="$DIR/issue1524-maven-upgrade-dependency-tree" --port=$PORT & -PID=$! -sleep 1 -trap 'kill $PID 2>/dev/null || true' exit - -echo "Trying to download maven-dubpackage-a (1.0.5) with dependency to maven-dubpackage-b (1.0.6)" -${DUB} upgrade --root "$DIR/issue1524-maven-upgrade-dependency-tree" --skip-registry=standard --registry=mvn+http://localhost:$PORT/maven/release/dubpackages - -if ! ${DUB} remove maven-dubpackage-a@1.0.5 2>/dev/null; then - die $LINENO 'DUB did not install package "maven-dubpackage-a" from maven registry.' -fi - -if ! ${DUB} remove maven-dubpackage-b@1.0.6 2>/dev/null; then - die $LINENO 'DUB did not install package "maven-dubpackage-b" from maven registry.' -fi - diff --git a/test/issue1524-maven-upgrade-dependency-tree.sh.min_frontend b/test/issue1524-maven-upgrade-dependency-tree.sh.min_frontend deleted file mode 100644 index 4817f99644..0000000000 --- a/test/issue1524-maven-upgrade-dependency-tree.sh.min_frontend +++ /dev/null @@ -1 +0,0 @@ -2.077 diff --git a/test/issue1524-maven-upgrade-dependency-tree/.gitignore b/test/issue1524-maven-upgrade-dependency-tree/.gitignore deleted file mode 100644 index 304e9559a5..0000000000 --- a/test/issue1524-maven-upgrade-dependency-tree/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -.dub -docs.json -__dummy.html -docs/ -*.exe -*.o -*.obj -*.lst diff --git a/test/issue1524-maven-upgrade-dependency-tree/.no_build b/test/issue1524-maven-upgrade-dependency-tree/.no_build deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/new_tests/issue1524-maven-upgrade-dependency-tree/.gitignore b/test/new_tests/issue1524-maven-upgrade-dependency-tree/.gitignore new file mode 100644 index 0000000000..349b2d0efc --- /dev/null +++ b/test/new_tests/issue1524-maven-upgrade-dependency-tree/.gitignore @@ -0,0 +1,7 @@ +/sample/** +!/sample/ +!/sample/dub.json +!/sample/maven/ +!/sample/maven/** +!/sample/source/ +!/sample/source/*.d \ No newline at end of file diff --git a/test/new_tests/issue1524-maven-upgrade-dependency-tree/dub.json b/test/new_tests/issue1524-maven-upgrade-dependency-tree/dub.json new file mode 100644 index 0000000000..274c5732c9 --- /dev/null +++ b/test/new_tests/issue1524-maven-upgrade-dependency-tree/dub.json @@ -0,0 +1,11 @@ +{ + "name": "issue1524-maven-upgrade-dependency-tree", + "dependencies": { + "common": { + "path": "../common" + }, + "test_registry_helper": { + "path": "../extra/test_registry" + } + } +} diff --git a/test/issue1524-maven-upgrade-dependency-tree/dub.json b/test/new_tests/issue1524-maven-upgrade-dependency-tree/sample/dub.json similarity index 97% rename from test/issue1524-maven-upgrade-dependency-tree/dub.json rename to test/new_tests/issue1524-maven-upgrade-dependency-tree/sample/dub.json index 131a264d30..8005251f7c 100644 --- a/test/issue1524-maven-upgrade-dependency-tree/dub.json +++ b/test/new_tests/issue1524-maven-upgrade-dependency-tree/sample/dub.json @@ -3,4 +3,4 @@ "dependencies": { "maven-dubpackage-a": "~>1.0.5" } -} \ No newline at end of file +} diff --git a/test/issue1524-maven-upgrade-dependency-tree/maven/release/dubpackages/maven-dubpackage-a/1.0.5/maven-dubpackage-a-1.0.5.zip b/test/new_tests/issue1524-maven-upgrade-dependency-tree/sample/maven/release/dubpackages/maven-dubpackage-a/1.0.5/maven-dubpackage-a-1.0.5.zip similarity index 100% rename from test/issue1524-maven-upgrade-dependency-tree/maven/release/dubpackages/maven-dubpackage-a/1.0.5/maven-dubpackage-a-1.0.5.zip rename to test/new_tests/issue1524-maven-upgrade-dependency-tree/sample/maven/release/dubpackages/maven-dubpackage-a/1.0.5/maven-dubpackage-a-1.0.5.zip diff --git a/test/issue1524-maven-upgrade-dependency-tree/maven/release/dubpackages/maven-dubpackage-a/maven-metadata.xml b/test/new_tests/issue1524-maven-upgrade-dependency-tree/sample/maven/release/dubpackages/maven-dubpackage-a/maven-metadata.xml similarity index 100% rename from test/issue1524-maven-upgrade-dependency-tree/maven/release/dubpackages/maven-dubpackage-a/maven-metadata.xml rename to test/new_tests/issue1524-maven-upgrade-dependency-tree/sample/maven/release/dubpackages/maven-dubpackage-a/maven-metadata.xml diff --git a/test/issue1524-maven-upgrade-dependency-tree/maven/release/dubpackages/maven-dubpackage-b/1.0.6/maven-dubpackage-b-1.0.6.zip b/test/new_tests/issue1524-maven-upgrade-dependency-tree/sample/maven/release/dubpackages/maven-dubpackage-b/1.0.6/maven-dubpackage-b-1.0.6.zip similarity index 100% rename from test/issue1524-maven-upgrade-dependency-tree/maven/release/dubpackages/maven-dubpackage-b/1.0.6/maven-dubpackage-b-1.0.6.zip rename to test/new_tests/issue1524-maven-upgrade-dependency-tree/sample/maven/release/dubpackages/maven-dubpackage-b/1.0.6/maven-dubpackage-b-1.0.6.zip diff --git a/test/issue1524-maven-upgrade-dependency-tree/maven/release/dubpackages/maven-dubpackage-b/maven-metadata.xml b/test/new_tests/issue1524-maven-upgrade-dependency-tree/sample/maven/release/dubpackages/maven-dubpackage-b/maven-metadata.xml similarity index 100% rename from test/issue1524-maven-upgrade-dependency-tree/maven/release/dubpackages/maven-dubpackage-b/maven-metadata.xml rename to test/new_tests/issue1524-maven-upgrade-dependency-tree/sample/maven/release/dubpackages/maven-dubpackage-b/maven-metadata.xml diff --git a/test/issue1524-maven-upgrade-dependency-tree/source/app.d b/test/new_tests/issue1524-maven-upgrade-dependency-tree/sample/source/app.d similarity index 100% rename from test/issue1524-maven-upgrade-dependency-tree/source/app.d rename to test/new_tests/issue1524-maven-upgrade-dependency-tree/sample/source/app.d diff --git a/test/new_tests/issue1524-maven-upgrade-dependency-tree/source/app.d b/test/new_tests/issue1524-maven-upgrade-dependency-tree/source/app.d new file mode 100644 index 0000000000..99893e7862 --- /dev/null +++ b/test/new_tests/issue1524-maven-upgrade-dependency-tree/source/app.d @@ -0,0 +1,28 @@ +import common; +import test_registry_helper; + +import std.algorithm; +import std.file; +import std.path; +import std.process; + +void main () { + auto testRegistry = TestRegistry("sample"); + immutable registryArgs = [ + "--skip-registry=standard", + "--registry=mvn+http://localhost:" ~ testRegistry.port ~ "/maven/release/dubpackages", + ]; + + // ignore errors + execute([dub, "remove", "maven-dubpackage-a", "--non-interactive"]); + execute([dub, "remove", "maven-dubpackage-b", "--non-interactive"]); + + if (spawnProcess([dub, "upgrade", "--root=sample"] ~ registryArgs).wait != 0) + die("Dub upgrade failed"); + + if (spawnProcess([dub, "remove", "maven-dubpackage-a@1.0.5"]).wait != 0) + die(`DUB did not install package "maven-dubpackage-a" from maven registry.`); + + if (spawnProcess([dub, "remove", "maven-dubpackage-b@1.0.6"]).wait != 0) + die(`DUB did not install package "maven-dubpackage-b" from maven registry.`); +} diff --git a/test/new_tests/issue1524-maven-upgrade-dependency-tree/test.config b/test/new_tests/issue1524-maven-upgrade-dependency-tree/test.config new file mode 100644 index 0000000000..b034b4d269 --- /dev/null +++ b/test/new_tests/issue1524-maven-upgrade-dependency-tree/test.config @@ -0,0 +1,2 @@ +locks = test_registry +dc_backend = [dmd, ldc] From 72fc2d54c01df5192f5e50d9ecf31ea6d9436557 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sun, 20 Jul 2025 17:53:58 +0300 Subject: [PATCH 095/187] issue1531-toolchain-requirements Signed-off-by: Andrei Horodniceanu --- test/issue1531-toolchain-requirements.sh | 101 ------------ .../issue1531-toolchain-requirements/dub.json | 8 + .../source/app.d | 148 ++++++++++++++++++ 3 files changed, 156 insertions(+), 101 deletions(-) delete mode 100755 test/issue1531-toolchain-requirements.sh create mode 100644 test/new_tests/issue1531-toolchain-requirements/dub.json create mode 100644 test/new_tests/issue1531-toolchain-requirements/source/app.d diff --git a/test/issue1531-toolchain-requirements.sh b/test/issue1531-toolchain-requirements.sh deleted file mode 100755 index 638167aa58..0000000000 --- a/test/issue1531-toolchain-requirements.sh +++ /dev/null @@ -1,101 +0,0 @@ -#!/usr/bin/env bash -set -e - -. $(dirname "${BASH_SOURCE[0]}")/common.sh - -cat << EOF | $DUB - || die $LINENO "Did not pass without toolchainRequirements" -/+ dub.sdl: -+/ -void main() {} -EOF - -# pass test dub requirement given as $1 -function test_dub_req_pass { - cat << EOF | $DUB - || die $LINENO "Did not pass requirement dub=\"$1\"" -/+ dub.sdl: - toolchainRequirements dub="$1" -+/ -void main() {} -EOF -} - -# fail test dub requirement given as $1 -function test_dub_req_fail { - ! cat << EOF | $DUB - || die $LINENO "Did not pass requirement dub=\"$1\"" -/+ dub.sdl: - toolchainRequirements dub="$1" -+/ -void main() {} -EOF -} - -test_dub_req_pass ">=1.7.0" -test_dub_req_fail "~>0.9" -test_dub_req_fail "~>999.0" - -# extract compiler version -if [[ $DC == *ldc* ]] || [[ $DC == *ldmd* ]]; then - VER_REG='\((([[:digit:]]+)(\.[[:digit:]]+\.[[:digit:]]+[A-Za-z0-9.+-]*))\)' - DC_NAME=ldc -elif [[ $DC == *dmd* ]]; then - VER_REG='v(([[:digit:]]+)(\.[[:digit:]]+\.[[:digit:]]+[A-Za-z0-9.+-]*))' - DC_NAME=dmd -elif [[ $DC == *gdc* ]]; then - VER_REG='\) (([[:digit:]]+)(\.[[:digit:]]+\.[[:digit:]]+[A-Za-z0-9.+-]*))' - DC_NAME=gdc -else - die $LINENO "Did not recognize compiler" -fi -if [[ $($DC --version) =~ $VER_REG ]]; then - DC_VER=${BASH_REMATCH[1]} - DC_VER_MAJ=${BASH_REMATCH[2]} - DC_VER_REM=${BASH_REMATCH[3]} - $DC --version - echo $DC version is $DC_VER -else - $DC --version - die $LINENO "Could not extract compiler version" -fi - -# create test app directory -TMPDIR=$(mktemp -d /tmp/dubtest1531_XXXXXX) -mkdir -p $TMPDIR/source -cat << EOF > $TMPDIR/source/app.d -module dubtest1531; -void main() {} -EOF - -# write dub.sdl with compiler requirement given as $1 -function write_cl_req { - cat << EOF > $TMPDIR/dub.sdl -name "dubtest1531" -toolchainRequirements ${DC_NAME}="$1" -EOF -} - -# pass test compiler requirement given as $1 -function test_cl_req_pass { - echo "Expecting success on '$DC $1'" 2>&1 - write_cl_req $1 - $DUB build -q --compiler=$DC --root=$TMPDIR || die $LINENO "Did not pass with $DC_NAME=\"$1\"" -} - -# fail test compiler requirement given as $1 -function test_cl_req_fail { - echo "Expecting failure on '$DC $1'" 2>&1 - write_cl_req $1 - ! $DUB --compiler=$DC --root=$TMPDIR || die $LINENO "Did not fail with $DC_NAME=\"$1\"" -} - - -test_cl_req_pass "==$DC_VER" -test_cl_req_pass ">=$DC_VER" -test_cl_req_fail ">$DC_VER" -test_cl_req_pass "<=$DC_VER" -test_cl_req_fail "<$DC_VER" -test_cl_req_pass ">=$DC_VER <$(($DC_VER_MAJ + 1))$DC_VER_REM" -test_cl_req_pass "~>$DC_VER" -test_cl_req_fail "~>$(($DC_VER_MAJ + 1))$DC_VER_REM" -test_cl_req_fail no - -rm -rf $TMPDIR diff --git a/test/new_tests/issue1531-toolchain-requirements/dub.json b/test/new_tests/issue1531-toolchain-requirements/dub.json new file mode 100644 index 0000000000..3e7a7b2581 --- /dev/null +++ b/test/new_tests/issue1531-toolchain-requirements/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue1531-toolchain-requirements", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/new_tests/issue1531-toolchain-requirements/source/app.d b/test/new_tests/issue1531-toolchain-requirements/source/app.d new file mode 100644 index 0000000000..ad7597d128 --- /dev/null +++ b/test/new_tests/issue1531-toolchain-requirements/source/app.d @@ -0,0 +1,148 @@ +import common; + +import std.algorithm; +import std.conv; +import std.file; +import std.path; +import std.process; + +version (LDC) + immutable dcName = "ldc"; +else version (DigitalMars) + immutable dcName = "dmd"; +else version (GNU) + immutable dcName = "gdc"; +else static assert (false, "Unknown compiler"); +string dcTestDubSdlPath; + +void main () { + testDub(">=1.7.0", true); + testDub("~>0.9", false); + testDub("~>999.0", false); + + if (exists("test")) + rmdirRecurse("test"); + mkdirRecurse(buildPath("test", "source")); + dcTestDubSdlPath = buildPath("test", "dub.sdl"); + write(buildPath("test", "source", "app.d"), q{ + module dubtest1531; + void main () {} + }); + + immutable ver = getDcVer(); + + Version nextMajor = ver; + nextMajor.major += 1; + + testDc("==" ~ ver, true); + testDc(">=" ~ ver, true); + testDc(">" ~ ver, false); + testDc("<=" ~ ver, true); + testDc("<" ~ ver, false); + testDc(">=" ~ ver ~ " <" ~ nextMajor, true); + testDc("~>" ~ ver, true); + testDc("~>" ~ nextMajor, false); + testDc("no", false); +} + +struct Version { + uint major; + uint minor; + uint patch; + string tail; + + string toString() const { + return text(major, ".", minor, ".", patch, tail); + } + alias toString this; +} + +Version getDcVer() { + import std.regex; + + immutable dc = environment["DC"]; + immutable dcBase = baseName(dc); + Regex!char r; + + if (dcBase.canFind("ldc") || dcBase.canFind("ldmd")) + r = regex(`\((\d+)\.(\d+)\.(\d+)([A-Za-z0-9.+-]*)\)`); + else if (dcBase.canFind("gdc")) + die("Not implemented"); + else if (dcBase.canFind("gdmd")) + return getDcVerGdmd(dc); + else if (dcBase.canFind("dmd")) + r = regex(`v(\d+)\.(\d+)\.(\d+)([A-Za-z0-9.+-]*)`); + else + die("Unknown DC: ", dcBase); + + immutable p = execute([dc, "--version"]); + if (p.status != 0) + die("Failed to execute `DC --version`"); + + const m = p.output.matchFirst(r); + if (!m) + die("DC --version printed in unknown format"); + + Version result; + result.major = m[1].to!uint; + result.minor = m[2].to!uint; + result.patch = m[3].to!uint; + result.tail = m[4]; + return result; + +} + +Version getDcVerGdmd(string dc) { + import std.array; + import std.string; + + immutable progLog = "`" ~ dc ~ " -q,-dumpfullversion --version`"; + immutable p = execute([dc, "-q,-dumpfullversion", "--version"]); + if (p.status != 0) + die("Couldn't execute ", progLog); + + immutable parts = p.output.chomp.split('.'); + if (parts.length != 3) { + log(p.output); + die(progLog, " didn't output version in 'major.minor.patch' format"); + } + + immutable np = parts.map!(to!int).array; + return Version(np[0], np[1], np[2], ""); +} + +void testDub(string requirement, bool expectSuccess) { + if (requirement !is null) + requirement = `toolchainRequirements dub="` ~ requirement ~ `"`; + + auto p = pipeProcess([dub, "-"], Redirect.stdin); + + p.stdin.writefln(q{ + /+ dub.sdl: + %s + +/ + void main() {} + }, + requirement); + + p.stdin.close(); + + immutable gotSuccess = p.pid.wait == 0; + if (gotSuccess != expectSuccess) + die("Did not pass with: ", requirement); +} + +void testDc(string requirement, bool expectSuccess) { + import std.stdio; + File(dcTestDubSdlPath, "w").writefln(` +name "dubtest1531" +toolchainRequirements %s="%s"`, dcName, requirement); + + writeln("Expecting ", expectSuccess ? "success" : "failure", " with ", dcName, " ", requirement); + stdout.flush(); + immutable gotSuccess = spawnProcess([dub, "build", "-q", "--root=test"]).wait == 0; + if (gotSuccess != expectSuccess) { + immutable error = gotSuccess ? "Did not fail" : "Did not pass"; + die(error, " with ", dcName, `="`, requirement, `"`); + } +} From b79352a3d3420de3dc538835a979ea7e4e89fe04 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sun, 20 Jul 2025 17:54:55 +0300 Subject: [PATCH 096/187] issue1551-var-escaping Signed-off-by: Andrei Horodniceanu --- test/{ => new_tests}/issue1551-var-escaping/dub.json | 0 test/{ => new_tests}/issue1551-var-escaping/source/app.d | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename test/{ => new_tests}/issue1551-var-escaping/dub.json (100%) rename test/{ => new_tests}/issue1551-var-escaping/source/app.d (100%) diff --git a/test/issue1551-var-escaping/dub.json b/test/new_tests/issue1551-var-escaping/dub.json similarity index 100% rename from test/issue1551-var-escaping/dub.json rename to test/new_tests/issue1551-var-escaping/dub.json diff --git a/test/issue1551-var-escaping/source/app.d b/test/new_tests/issue1551-var-escaping/source/app.d similarity index 100% rename from test/issue1551-var-escaping/source/app.d rename to test/new_tests/issue1551-var-escaping/source/app.d From d7c7e5f8c3a94c1581fd61d68960032e860b4aa3 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sun, 20 Jul 2025 18:01:53 +0300 Subject: [PATCH 097/187] issue1556-fetch-and-build-pkgs Signed-off-by: Andrei Horodniceanu --- test/issue1556-fetch-and-build-pkgs/.no_build | 0 test/issue1556-fetch-and-build.sh | 15 ---------- .../issue1556-fetch-and-build/.gitignore | 3 ++ .../issue1556-fetch-and-build/dub.json | 8 ++++++ .../sample}/dependency-package-1.0.0.zip | Bin .../sample}/main-package-1.0.0.zip | Bin .../issue1556-fetch-and-build/source/app.d | 26 ++++++++++++++++++ 7 files changed, 37 insertions(+), 15 deletions(-) delete mode 100644 test/issue1556-fetch-and-build-pkgs/.no_build delete mode 100755 test/issue1556-fetch-and-build.sh create mode 100644 test/new_tests/issue1556-fetch-and-build/.gitignore create mode 100644 test/new_tests/issue1556-fetch-and-build/dub.json rename test/{issue1556-fetch-and-build-pkgs => new_tests/issue1556-fetch-and-build/sample}/dependency-package-1.0.0.zip (100%) rename test/{issue1556-fetch-and-build-pkgs => new_tests/issue1556-fetch-and-build/sample}/main-package-1.0.0.zip (100%) create mode 100644 test/new_tests/issue1556-fetch-and-build/source/app.d diff --git a/test/issue1556-fetch-and-build-pkgs/.no_build b/test/issue1556-fetch-and-build-pkgs/.no_build deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/issue1556-fetch-and-build.sh b/test/issue1556-fetch-and-build.sh deleted file mode 100755 index 6bef98d7b9..0000000000 --- a/test/issue1556-fetch-and-build.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env bash -DIR=$(dirname "${BASH_SOURCE[0]}") - -. "$DIR"/common.sh - -dub remove main-package --non-interactive 2>/dev/null || true -dub remove dependency-package --non-interactive 2>/dev/null || true - - -echo "Trying to fetch fs-sdl-dubpackage" -"$DUB" --cache=local fetch main-package --skip-registry=all --registry=file://"$DIR"/issue1556-fetch-and-build-pkgs - -echo "Trying to build it (should fetch dependency-package)" -"$DUB" --cache=local build main-package --skip-registry=all --registry=file://"$DIR"/issue1556-fetch-and-build-pkgs - diff --git a/test/new_tests/issue1556-fetch-and-build/.gitignore b/test/new_tests/issue1556-fetch-and-build/.gitignore new file mode 100644 index 0000000000..ea815def5c --- /dev/null +++ b/test/new_tests/issue1556-fetch-and-build/.gitignore @@ -0,0 +1,3 @@ +/sample/* +!/sample/ +!/sample/*.zip diff --git a/test/new_tests/issue1556-fetch-and-build/dub.json b/test/new_tests/issue1556-fetch-and-build/dub.json new file mode 100644 index 0000000000..8d6718db26 --- /dev/null +++ b/test/new_tests/issue1556-fetch-and-build/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue1556-fetch-and-build", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/issue1556-fetch-and-build-pkgs/dependency-package-1.0.0.zip b/test/new_tests/issue1556-fetch-and-build/sample/dependency-package-1.0.0.zip similarity index 100% rename from test/issue1556-fetch-and-build-pkgs/dependency-package-1.0.0.zip rename to test/new_tests/issue1556-fetch-and-build/sample/dependency-package-1.0.0.zip diff --git a/test/issue1556-fetch-and-build-pkgs/main-package-1.0.0.zip b/test/new_tests/issue1556-fetch-and-build/sample/main-package-1.0.0.zip similarity index 100% rename from test/issue1556-fetch-and-build-pkgs/main-package-1.0.0.zip rename to test/new_tests/issue1556-fetch-and-build/sample/main-package-1.0.0.zip diff --git a/test/new_tests/issue1556-fetch-and-build/source/app.d b/test/new_tests/issue1556-fetch-and-build/source/app.d new file mode 100644 index 0000000000..bed423d32c --- /dev/null +++ b/test/new_tests/issue1556-fetch-and-build/source/app.d @@ -0,0 +1,26 @@ +import common; + +import std.algorithm; +import std.file; +import std.path; +import std.process; + +void main () { + execute([dub, "remove", "main-package", "--non-interactive"]); + execute([dub, "remove", "dependency-package", "--non-interactive"]); + + immutable registryArgs = [ + "--skip-registry=all", + "--registry=file://" ~ getcwd().buildPath("sample"), + ]; + + log("Trying to fetch main-package"); + auto p = spawnProcess([dub, "--cache=local", "fetch", "main-package"] ~ registryArgs); + if (p.wait != 0) + die("Dub fetch failed"); + + log("Trying to build it (should fetch dependency-package)"); + p = spawnProcess([dub, "--cache=local", "build", "main-package"] ~ registryArgs); + if (p.wait != 0) + die("Dub fetch failed"); +} From 22fd99a6ca75261a1955fc70fb14cb63fdf668a5 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sun, 20 Jul 2025 18:06:03 +0300 Subject: [PATCH 098/187] issue1567-fetch-sub-package Signed-off-by: Andrei Horodniceanu --- test/issue1567-fetch-sub-package.sh | 12 ----------- test/issue1567-fetch-sub-package/.no_build | 0 test/issue1567-fetch-sub-package/.no_run | 0 test/issue1567-fetch-sub-package/.no_test | 0 .../issue1567-fetch-sub-package/.gitignore | 3 +++ .../issue1567-fetch-sub-package/dub.json | 8 +++++++ .../fetch-sub-package-dubpackage-1.0.1.zip | Bin .../issue1567-fetch-sub-package/source/app.d | 20 ++++++++++++++++++ 8 files changed, 31 insertions(+), 12 deletions(-) delete mode 100755 test/issue1567-fetch-sub-package.sh delete mode 100644 test/issue1567-fetch-sub-package/.no_build delete mode 100644 test/issue1567-fetch-sub-package/.no_run delete mode 100644 test/issue1567-fetch-sub-package/.no_test create mode 100644 test/new_tests/issue1567-fetch-sub-package/.gitignore create mode 100644 test/new_tests/issue1567-fetch-sub-package/dub.json rename test/{issue1567-fetch-sub-package => new_tests/issue1567-fetch-sub-package/sample}/fetch-sub-package-dubpackage-1.0.1.zip (100%) create mode 100644 test/new_tests/issue1567-fetch-sub-package/source/app.d diff --git a/test/issue1567-fetch-sub-package.sh b/test/issue1567-fetch-sub-package.sh deleted file mode 100755 index 62c067844e..0000000000 --- a/test/issue1567-fetch-sub-package.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash -. $(dirname "${BASH_SOURCE[0]}")/common.sh -DIR=$(dirname "${BASH_SOURCE[0]}") -packname="fetch-sub-package-dubpackage" -sub_packagename="my-sub-package" - -${DUB} remove $packname --non-interactive 2>/dev/null || true -${DUB} fetch "$packname:$sub_packagename" --skip-registry=all --registry=file://"$DIR"/issue1567-fetch-sub-package - -if ! ${DUB} remove $packname@1.0.1 2>/dev/null; then - die $LINENO 'DUB did not install package $packname:$sub_packagename.' -fi diff --git a/test/issue1567-fetch-sub-package/.no_build b/test/issue1567-fetch-sub-package/.no_build deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/issue1567-fetch-sub-package/.no_run b/test/issue1567-fetch-sub-package/.no_run deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/issue1567-fetch-sub-package/.no_test b/test/issue1567-fetch-sub-package/.no_test deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/new_tests/issue1567-fetch-sub-package/.gitignore b/test/new_tests/issue1567-fetch-sub-package/.gitignore new file mode 100644 index 0000000000..ea815def5c --- /dev/null +++ b/test/new_tests/issue1567-fetch-sub-package/.gitignore @@ -0,0 +1,3 @@ +/sample/* +!/sample/ +!/sample/*.zip diff --git a/test/new_tests/issue1567-fetch-sub-package/dub.json b/test/new_tests/issue1567-fetch-sub-package/dub.json new file mode 100644 index 0000000000..deefee5f0a --- /dev/null +++ b/test/new_tests/issue1567-fetch-sub-package/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue1567-fetch-sub-package", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/issue1567-fetch-sub-package/fetch-sub-package-dubpackage-1.0.1.zip b/test/new_tests/issue1567-fetch-sub-package/sample/fetch-sub-package-dubpackage-1.0.1.zip similarity index 100% rename from test/issue1567-fetch-sub-package/fetch-sub-package-dubpackage-1.0.1.zip rename to test/new_tests/issue1567-fetch-sub-package/sample/fetch-sub-package-dubpackage-1.0.1.zip diff --git a/test/new_tests/issue1567-fetch-sub-package/source/app.d b/test/new_tests/issue1567-fetch-sub-package/source/app.d new file mode 100644 index 0000000000..0d88c8837d --- /dev/null +++ b/test/new_tests/issue1567-fetch-sub-package/source/app.d @@ -0,0 +1,20 @@ +import common; + +import std.algorithm; +import std.file; +import std.path; +import std.process; + +void main () { + immutable pkgName = "fetch-sub-package-dubpackage"; + immutable subPkgName = pkgName ~ ":my-sub-package"; + + execute([dub, "remove", pkgName]); + + auto p = spawnProcess([dub, "fetch", subPkgName, "--skip-registry=all", "--registry=file://" ~ getcwd().buildPath("sample")]); + if (p.wait != 0) + die("Dub fetch failed"); + + if (spawnProcess([dub, "remove", pkgName ~ "@1.0.1"]).wait != 0) + die("DUB did not install package $packname:$sub_packagename."); +} From 8c435ff574e0b89c257c082417204c825eaad0df Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sun, 20 Jul 2025 18:26:06 +0300 Subject: [PATCH 099/187] issue1574-addcommand Signed-off-by: Andrei Horodniceanu --- test/issue1574-addcommand.sh | 36 ------------- test/issue1574-addcommand.sh.min_frontend | 1 - test/new_tests/issue1574-addcommand/dub.json | 11 ++++ .../issue1574-addcommand/source/app.d | 50 +++++++++++++++++++ .../issue1574-addcommand/test.config | 2 + 5 files changed, 63 insertions(+), 37 deletions(-) delete mode 100755 test/issue1574-addcommand.sh delete mode 100644 test/issue1574-addcommand.sh.min_frontend create mode 100644 test/new_tests/issue1574-addcommand/dub.json create mode 100644 test/new_tests/issue1574-addcommand/source/app.d create mode 100644 test/new_tests/issue1574-addcommand/test.config diff --git a/test/issue1574-addcommand.sh b/test/issue1574-addcommand.sh deleted file mode 100755 index 94d90f1340..0000000000 --- a/test/issue1574-addcommand.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env bash -DIR=$(dirname "${BASH_SOURCE[0]}") - -. "$DIR"/common.sh - -PORT=$(getRandomPort) -tempDir="issue1574-addcommand" - -"$DUB" build --single "$DIR"/test_registry.d -"$DIR"/test_registry --folder="$DIR/issue1336-registry" --port=$PORT & -PID=$! -sleep 1 - -function cleanup { - cd .. - rm -rf $tempDir - kill $PID 2>/dev/null || true -} -trap cleanup EXIT - - -$DUB init --non-interactive --format=json $tempDir -cd $tempDir - -echo "import gitcompatibledubpackage.subdir.file; void main(){}" > source/app.d -$DUB add gitcompatibledubpackage --skip-registry=all --registry=http://localhost:$PORT -grep -q '"gitcompatibledubpackage"\s*:\s*"~>1\.0\.4"' dub.json -$DUB add gitcompatibledubpackage=1.0.2 non-existing-issue1574-pkg='~>9.8.7' --skip-registry=all -grep -q '"gitcompatibledubpackage"\s*:\s*"1\.0\.2"' dub.json -grep -q '"non-existing-issue1574-pkg"\s*:\s*"~>9\.8\.7"' dub.json -if $DUB add foo@1.2.3 gitcompatibledubpackage='~>a.b.c' --skip-registry=all; then - die $LINENO 'Adding non-semver spec should error' -fi -if grep -q '"foo"' dub.json; then - die $LINENO 'Failing add command should not write recipe file' -fi diff --git a/test/issue1574-addcommand.sh.min_frontend b/test/issue1574-addcommand.sh.min_frontend deleted file mode 100644 index 4817f99644..0000000000 --- a/test/issue1574-addcommand.sh.min_frontend +++ /dev/null @@ -1 +0,0 @@ -2.077 diff --git a/test/new_tests/issue1574-addcommand/dub.json b/test/new_tests/issue1574-addcommand/dub.json new file mode 100644 index 0000000000..ae73ace420 --- /dev/null +++ b/test/new_tests/issue1574-addcommand/dub.json @@ -0,0 +1,11 @@ +{ + "name": "issue1564-addcommand", + "dependencies": { + "common": { + "path": "../common" + }, + "test_registry_helper": { + "path": "../extra/test_registry" + } + } +} diff --git a/test/new_tests/issue1574-addcommand/source/app.d b/test/new_tests/issue1574-addcommand/source/app.d new file mode 100644 index 0000000000..4f87e5d02b --- /dev/null +++ b/test/new_tests/issue1574-addcommand/source/app.d @@ -0,0 +1,50 @@ +import common; +import test_registry_helper; + +import std.algorithm; +import std.file; +import std.path; +import std.process; +import std.regex; + +void main () { + auto testRegistry = TestRegistry("../extra/issue1336-registry"); + immutable registryArgs = [ + "--skip-registry=all", + "--registry=http://localhost:" ~ testRegistry.port, + ]; + + if (exists("test")) rmdirRecurse("test"); + if (spawnProcess([dub, "init", "--non-interactive", "--format=json", "test"]).wait != 0) + die("Dub init failed"); + chdir("test"); + + write("source/app.d", q{import gitcompatibledubpackage.subdir.file; void main(){}}); + if (spawnProcess([dub, "add", "gitcompatibledubpackage"] ~ registryArgs).wait != 0) + die("Dub add failed"); + if (!readText("dub.json").matchFirst(`"gitcompatibledubpackage"\s*:\s*"~>1\.0\.4"`)) + die("dub add did not modify dub.json to reflect the new dependency"); + + { + auto p = spawnProcess([ + dub, "add", "gitcompatibledubpackage=1.0.2", "non-existing-issue1574-pkg=~>9.8.7", "--skip-registry=all"] + ); + if (p.wait != 0) + die("Dub add with version failed"); + + immutable dubJson = readText("dub.json"); + if (!dubJson.matchFirst(`"gitcompatibledubpackage"\s*:\s*"1\.0\.2"`)) + die("dub add did not modify gitcompatibledubpackage dependency"); + if (!dubJson.matchFirst(`"non-existing-issue1574-pkg"\s*:\s*"~>9\.8\.7"`)) + die("dub did not add a dependency on a non-existing package with --skip-registry=all"); + } + + { + auto p = spawnProcess([dub, "add", "foo@1.2.3", "gitcompatibledubpackage=~>a.b.c", "--skip-registry=all"]); + if (p.wait == 0) + die("Adding non-semver spec should error"); + if (readText("dub.json").canFind(`"foo"`)) + die("Failing add command should not write recipe file"); + } + +} diff --git a/test/new_tests/issue1574-addcommand/test.config b/test/new_tests/issue1574-addcommand/test.config new file mode 100644 index 0000000000..a7d966bb21 --- /dev/null +++ b/test/new_tests/issue1574-addcommand/test.config @@ -0,0 +1,2 @@ +locks = test_registry +dc_backend = [dmd, ldc] \ No newline at end of file From 1db75b6b5341ef85afbb9bf2d7678dcf52e40e38 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sun, 20 Jul 2025 18:31:32 +0300 Subject: [PATCH 100/187] issue1636-betterC-dub-test Signed-off-by: Andrei Horodniceanu --- test/issue1636-betterC-dub-test.sh | 5 ----- test/issue1636-betterC-dub-test/.gitignore | 4 ---- test/issue1636-betterC-dub-test/.min_frontend | 1 - test/issue1636-betterC-dub-test/.no_run | 0 .../issue1636-betterC-dub-test/.gitignore | 5 +++++ .../issue1636-betterC-dub-test/dub.json | 8 ++++++++ .../issue1636-betterC-dub-test/sample}/dub.json | 0 .../sample}/source/lib.d | 0 .../issue1636-betterC-dub-test/source/app.d | 16 ++++++++++++++++ 9 files changed, 29 insertions(+), 10 deletions(-) delete mode 100755 test/issue1636-betterC-dub-test.sh delete mode 100644 test/issue1636-betterC-dub-test/.gitignore delete mode 100644 test/issue1636-betterC-dub-test/.min_frontend delete mode 100644 test/issue1636-betterC-dub-test/.no_run create mode 100644 test/new_tests/issue1636-betterC-dub-test/.gitignore create mode 100644 test/new_tests/issue1636-betterC-dub-test/dub.json rename test/{issue1636-betterC-dub-test => new_tests/issue1636-betterC-dub-test/sample}/dub.json (100%) rename test/{issue1636-betterC-dub-test => new_tests/issue1636-betterC-dub-test/sample}/source/lib.d (100%) create mode 100644 test/new_tests/issue1636-betterC-dub-test/source/app.d diff --git a/test/issue1636-betterC-dub-test.sh b/test/issue1636-betterC-dub-test.sh deleted file mode 100755 index f2062c6283..0000000000 --- a/test/issue1636-betterC-dub-test.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -cd ${CURR_DIR}/issue1636-betterC-dub-test - -${DUB} test | grep -c "TEST_WAS_RUN" > /dev/null diff --git a/test/issue1636-betterC-dub-test/.gitignore b/test/issue1636-betterC-dub-test/.gitignore deleted file mode 100644 index 53b683b0ab..0000000000 --- a/test/issue1636-betterC-dub-test/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -test -*.o -*.exe -.dub diff --git a/test/issue1636-betterC-dub-test/.min_frontend b/test/issue1636-betterC-dub-test/.min_frontend deleted file mode 100644 index 67aaf4ad8d..0000000000 --- a/test/issue1636-betterC-dub-test/.min_frontend +++ /dev/null @@ -1 +0,0 @@ -2.078 diff --git a/test/issue1636-betterC-dub-test/.no_run b/test/issue1636-betterC-dub-test/.no_run deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/new_tests/issue1636-betterC-dub-test/.gitignore b/test/new_tests/issue1636-betterC-dub-test/.gitignore new file mode 100644 index 0000000000..20656516f1 --- /dev/null +++ b/test/new_tests/issue1636-betterC-dub-test/.gitignore @@ -0,0 +1,5 @@ +/sample/** +!/sample/ +!/sample/dub.json +!/sample/source/ +!/sample/source/*.d diff --git a/test/new_tests/issue1636-betterC-dub-test/dub.json b/test/new_tests/issue1636-betterC-dub-test/dub.json new file mode 100644 index 0000000000..26b5ba48bc --- /dev/null +++ b/test/new_tests/issue1636-betterC-dub-test/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue1636-betterC-dub-test", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/issue1636-betterC-dub-test/dub.json b/test/new_tests/issue1636-betterC-dub-test/sample/dub.json similarity index 100% rename from test/issue1636-betterC-dub-test/dub.json rename to test/new_tests/issue1636-betterC-dub-test/sample/dub.json diff --git a/test/issue1636-betterC-dub-test/source/lib.d b/test/new_tests/issue1636-betterC-dub-test/sample/source/lib.d similarity index 100% rename from test/issue1636-betterC-dub-test/source/lib.d rename to test/new_tests/issue1636-betterC-dub-test/sample/source/lib.d diff --git a/test/new_tests/issue1636-betterC-dub-test/source/app.d b/test/new_tests/issue1636-betterC-dub-test/source/app.d new file mode 100644 index 0000000000..f427ed6bf8 --- /dev/null +++ b/test/new_tests/issue1636-betterC-dub-test/source/app.d @@ -0,0 +1,16 @@ +import common; + +import std.algorithm; +import std.file; +import std.path; +import std.process; + +void main () { + // FIXME: DFLAGS disable unittests: https://github.com/dlang/dub/pull/3060 + environment.remove("DFLAGS"); + + auto p = teeProcess([dub, "test"], Redirect.stdout, null, Config.none, "sample"); + p.wait; + if (!p.stdout.canFind("TEST_WAS_RUN")) + die("Tests weren't run"); +} From 4a600aaa12b3d05450e60c8f7389d5da45fe6986 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sun, 20 Jul 2025 18:50:20 +0300 Subject: [PATCH 101/187] issue1645-dflags-build Signed-off-by: Andrei Horodniceanu --- test/issue1645-dflags-build.sh | 11 --------- .../new_tests/issue1645-dflags-build/dub.json | 8 +++++++ .../issue1645-dflags-build/source/app.d | 23 +++++++++++++++++++ .../issue1645-dflags-build/test.config | 1 + 4 files changed, 32 insertions(+), 11 deletions(-) delete mode 100755 test/issue1645-dflags-build.sh create mode 100644 test/new_tests/issue1645-dflags-build/dub.json create mode 100644 test/new_tests/issue1645-dflags-build/source/app.d create mode 100644 test/new_tests/issue1645-dflags-build/test.config diff --git a/test/issue1645-dflags-build.sh b/test/issue1645-dflags-build.sh deleted file mode 100755 index 5fbcb1e351..0000000000 --- a/test/issue1645-dflags-build.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bash - -set -e - -# If DFLAGS are not processed, dub for library would fail -DFLAGS="-w" $DUB build --root="$CURR_DIR"/1-staticLib-simple --build=plain -if DFLAGS="-asfdsf" $DUB build --root="$CURR_DIR"/1-staticLib-simple --build=plain 2>/dev/null; then - echo "Should not accept this DFLAGS"; - false # fail -fi -$DUB build --root="$CURR_DIR"/1-staticLib-simple --build=plain --build=plain diff --git a/test/new_tests/issue1645-dflags-build/dub.json b/test/new_tests/issue1645-dflags-build/dub.json new file mode 100644 index 0000000000..fadc05736b --- /dev/null +++ b/test/new_tests/issue1645-dflags-build/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue1645-dflags-build", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/new_tests/issue1645-dflags-build/source/app.d b/test/new_tests/issue1645-dflags-build/source/app.d new file mode 100644 index 0000000000..c0c3e57bb8 --- /dev/null +++ b/test/new_tests/issue1645-dflags-build/source/app.d @@ -0,0 +1,23 @@ +import common; + +import std.algorithm; +import std.file; +import std.path; +import std.process; + +void main () { + immutable testDir = "../1-staticLib-simple"; + + // If DFLAGS are not processed, dub for library would fail + auto p = spawnProcess([dub, "build", "--build=plain"], ["DFLAGS": "-w"], Config.none, testDir); + if (p.wait != 0) + die("Dub build with sane DFLAGS failed"); + + p = spawnProcess([dub, "build", "--build=plain"], ["DFLAGS": "-asfdsf"], Config.none, testDir); + if (p.wait == 0) + die("Dub build with insafe DFLAGS succeeded"); + + p = spawnProcess([dub, "build", "--build=plain", "--build=plain"], null, Config.none, testDir); + if (p.wait != 0) + die("Dub build with multiple --build=plain failed"); +} diff --git a/test/new_tests/issue1645-dflags-build/test.config b/test/new_tests/issue1645-dflags-build/test.config new file mode 100644 index 0000000000..2987a7647a --- /dev/null +++ b/test/new_tests/issue1645-dflags-build/test.config @@ -0,0 +1 @@ +locks = 1-staticLib-simple \ No newline at end of file From a3a7f2513c32cca17905ccf066968cb5f423d4c9 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sun, 20 Jul 2025 18:59:16 +0300 Subject: [PATCH 102/187] issue1651-custom-dub-init-type Signed-off-by: Andrei Horodniceanu --- test/issue1651-custom-dub-init-type.sh | 25 ----------- test/issue1651-custom-dub-init-type/.no_build | 0 test/issue1651-custom-dub-init-type/.no_run | 0 test/issue1651-custom-dub-init-type/.no_test | 0 .../issue1651-custom-dub-init-type/.gitignore | 3 ++ .../issue1651-custom-dub-init-type/dub.json | 8 ++++ .../custom-dub-init-dubpackage-1.0.1.zip | Bin .../source/app.d | 39 ++++++++++++++++++ 8 files changed, 50 insertions(+), 25 deletions(-) delete mode 100755 test/issue1651-custom-dub-init-type.sh delete mode 100644 test/issue1651-custom-dub-init-type/.no_build delete mode 100644 test/issue1651-custom-dub-init-type/.no_run delete mode 100644 test/issue1651-custom-dub-init-type/.no_test create mode 100644 test/new_tests/issue1651-custom-dub-init-type/.gitignore create mode 100644 test/new_tests/issue1651-custom-dub-init-type/dub.json rename test/{issue1651-custom-dub-init-type => new_tests/issue1651-custom-dub-init-type/sample}/custom-dub-init-dubpackage-1.0.1.zip (100%) create mode 100644 test/new_tests/issue1651-custom-dub-init-type/source/app.d diff --git a/test/issue1651-custom-dub-init-type.sh b/test/issue1651-custom-dub-init-type.sh deleted file mode 100755 index 0efafa9297..0000000000 --- a/test/issue1651-custom-dub-init-type.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env bash -. $(dirname "${BASH_SOURCE[0]}")/common.sh -DIR=$(dirname "${BASH_SOURCE[0]}") -packname="custom-dub-init-type-sample" - -$DUB remove custom-dub-init-dubpackage --non-interactive 2>/dev/null || true -$DUB init -n $packname --format sdl -t custom-dub-init-dubpackage --skip-registry=all --registry=file://"$DIR"/issue1651-custom-dub-init-type -- --foo=bar - -function cleanup { - rm -rf $packname -} - -if [ ! -e $packname/dub.sdl ]; then # it failed - cleanup - die $LINENO 'No dub.sdl file has been generated.' -fi - -cd $packname -if ! { ${DUB} 2>&1 || true; } | grep -cF 'foo=bar'; then - cd .. - cleanup - die $LINENO 'Custom init type.' -fi -cd .. -cleanup diff --git a/test/issue1651-custom-dub-init-type/.no_build b/test/issue1651-custom-dub-init-type/.no_build deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/issue1651-custom-dub-init-type/.no_run b/test/issue1651-custom-dub-init-type/.no_run deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/issue1651-custom-dub-init-type/.no_test b/test/issue1651-custom-dub-init-type/.no_test deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/new_tests/issue1651-custom-dub-init-type/.gitignore b/test/new_tests/issue1651-custom-dub-init-type/.gitignore new file mode 100644 index 0000000000..27a97c99bf --- /dev/null +++ b/test/new_tests/issue1651-custom-dub-init-type/.gitignore @@ -0,0 +1,3 @@ +/sample/** +!/sample/ +!/sample/*.zip diff --git a/test/new_tests/issue1651-custom-dub-init-type/dub.json b/test/new_tests/issue1651-custom-dub-init-type/dub.json new file mode 100644 index 0000000000..202445f5a8 --- /dev/null +++ b/test/new_tests/issue1651-custom-dub-init-type/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue1651-custom-dub-init-type", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/issue1651-custom-dub-init-type/custom-dub-init-dubpackage-1.0.1.zip b/test/new_tests/issue1651-custom-dub-init-type/sample/custom-dub-init-dubpackage-1.0.1.zip similarity index 100% rename from test/issue1651-custom-dub-init-type/custom-dub-init-dubpackage-1.0.1.zip rename to test/new_tests/issue1651-custom-dub-init-type/sample/custom-dub-init-dubpackage-1.0.1.zip diff --git a/test/new_tests/issue1651-custom-dub-init-type/source/app.d b/test/new_tests/issue1651-custom-dub-init-type/source/app.d new file mode 100644 index 0000000000..167bfad49b --- /dev/null +++ b/test/new_tests/issue1651-custom-dub-init-type/source/app.d @@ -0,0 +1,39 @@ +import common; + +import std.algorithm; +import std.file; +import std.path; +import std.process; + +void main () { + execute([dub, "remove", "custom-dub-init-dubpackage", "--non-interactive"]); + + if (exists("test")) rmdirRecurse("test"); + + { + auto p = spawnProcess([ + dub, + "init", + "-n", + "test", + "--format=sdl", + "-t", "custom-dub-init-dubpackage", + "--skip-registry=all", + "--registry=file://" ~ getcwd().buildPath("sample"), + "--", + "--foo=bar", + ]); + if (p.wait != 0) + die("dub init -t failed"); + } + + if (!exists("test/dub.sdl")) + die("No dub.sdl file has been generated"); + + { + auto p = teeProcess([dub], Redirect.stdout, null, Config.none, "test"); + p.wait; + if (!p.stdout.canFind("--foo=bar")) + die("Custom init type failed"); + } +} From e7362c72d462322b47fc3925e939a2bb00118834 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sun, 20 Jul 2025 19:03:05 +0300 Subject: [PATCH 103/187] issue1691-build-subpkg Signed-off-by: Andrei Horodniceanu --- test/issue1691-build-subpkg.sh | 3 --- test/issue1691-build-subpkg/.gitignore | 15 --------------- test/issue1691-build-subpkg/.no_build | 0 test/new_tests/issue1691-build-subpkg/.gitignore | 9 +++++++++ test/new_tests/issue1691-build-subpkg/dub.json | 8 ++++++++ .../issue1691-build-subpkg/sample}/dub.sdl | 0 .../issue1691-build-subpkg/sample}/source/app.d | 0 .../issue1691-build-subpkg/sample}/subpkg/dub.sdl | 0 .../sample}/subpkg/source/subpkg.d | 0 .../new_tests/issue1691-build-subpkg/source/app.d | 8 ++++++++ 10 files changed, 25 insertions(+), 18 deletions(-) delete mode 100755 test/issue1691-build-subpkg.sh delete mode 100644 test/issue1691-build-subpkg/.gitignore delete mode 100644 test/issue1691-build-subpkg/.no_build create mode 100644 test/new_tests/issue1691-build-subpkg/.gitignore create mode 100644 test/new_tests/issue1691-build-subpkg/dub.json rename test/{issue1691-build-subpkg => new_tests/issue1691-build-subpkg/sample}/dub.sdl (100%) rename test/{issue1691-build-subpkg => new_tests/issue1691-build-subpkg/sample}/source/app.d (100%) rename test/{issue1691-build-subpkg => new_tests/issue1691-build-subpkg/sample}/subpkg/dub.sdl (100%) rename test/{issue1691-build-subpkg => new_tests/issue1691-build-subpkg/sample}/subpkg/source/subpkg.d (100%) create mode 100644 test/new_tests/issue1691-build-subpkg/source/app.d diff --git a/test/issue1691-build-subpkg.sh b/test/issue1691-build-subpkg.sh deleted file mode 100755 index ea700687fa..0000000000 --- a/test/issue1691-build-subpkg.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash -. $(dirname "${BASH_SOURCE[0]}")/common.sh -$DUB build --root="$CURR_DIR/issue1691-build-subpkg" :subpkg diff --git a/test/issue1691-build-subpkg/.gitignore b/test/issue1691-build-subpkg/.gitignore deleted file mode 100644 index 1ba396039a..0000000000 --- a/test/issue1691-build-subpkg/.gitignore +++ /dev/null @@ -1,15 +0,0 @@ -.dub -docs.json -__dummy.html -docs/ -/issue1691-build-subpkg -issue1691-build-subpkg.so -issue1691-build-subpkg.dylib -issue1691-build-subpkg.dll -issue1691-build-subpkg.a -issue1691-build-subpkg.lib -issue1691-build-subpkg-test-* -*.exe -*.o -*.obj -*.lst diff --git a/test/issue1691-build-subpkg/.no_build b/test/issue1691-build-subpkg/.no_build deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/new_tests/issue1691-build-subpkg/.gitignore b/test/new_tests/issue1691-build-subpkg/.gitignore new file mode 100644 index 0000000000..8ff0570708 --- /dev/null +++ b/test/new_tests/issue1691-build-subpkg/.gitignore @@ -0,0 +1,9 @@ +/sample/** +!/sample/ +!/sample/dub.sdl +!/sample/source/ +!/sample/source/*.d +!/sample/subpkg/ +!/sample/subpkg/dub.sdl +!/sample/subpkg/source/ +!/sample/subpkg/source/*.d \ No newline at end of file diff --git a/test/new_tests/issue1691-build-subpkg/dub.json b/test/new_tests/issue1691-build-subpkg/dub.json new file mode 100644 index 0000000000..46510c1c11 --- /dev/null +++ b/test/new_tests/issue1691-build-subpkg/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue1691-build-subpkg", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/issue1691-build-subpkg/dub.sdl b/test/new_tests/issue1691-build-subpkg/sample/dub.sdl similarity index 100% rename from test/issue1691-build-subpkg/dub.sdl rename to test/new_tests/issue1691-build-subpkg/sample/dub.sdl diff --git a/test/issue1691-build-subpkg/source/app.d b/test/new_tests/issue1691-build-subpkg/sample/source/app.d similarity index 100% rename from test/issue1691-build-subpkg/source/app.d rename to test/new_tests/issue1691-build-subpkg/sample/source/app.d diff --git a/test/issue1691-build-subpkg/subpkg/dub.sdl b/test/new_tests/issue1691-build-subpkg/sample/subpkg/dub.sdl similarity index 100% rename from test/issue1691-build-subpkg/subpkg/dub.sdl rename to test/new_tests/issue1691-build-subpkg/sample/subpkg/dub.sdl diff --git a/test/issue1691-build-subpkg/subpkg/source/subpkg.d b/test/new_tests/issue1691-build-subpkg/sample/subpkg/source/subpkg.d similarity index 100% rename from test/issue1691-build-subpkg/subpkg/source/subpkg.d rename to test/new_tests/issue1691-build-subpkg/sample/subpkg/source/subpkg.d diff --git a/test/new_tests/issue1691-build-subpkg/source/app.d b/test/new_tests/issue1691-build-subpkg/source/app.d new file mode 100644 index 0000000000..0473bdaa57 --- /dev/null +++ b/test/new_tests/issue1691-build-subpkg/source/app.d @@ -0,0 +1,8 @@ +import common; + +import std.process; + +void main () { + if (spawnProcess([dub, "build", "--root=sample", ":subpkg"]).wait != 0) + die("dub build subpackage failed"); +} From 0980f4a85b05b87b938d388e9ffebd0c18e3fb6b Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sun, 20 Jul 2025 19:08:59 +0300 Subject: [PATCH 104/187] issue1739-project-settings-file Signed-off-by: Andrei Horodniceanu --- test/issue1739-project-settings-file.sh | 16 ---------------- .../issue1739-project-settings-file/.gitignore | 3 +++ .../issue1739-project-settings-file/dub.json | 8 ++++++++ .../sample/single.d | 2 ++ .../issue1739-project-settings-file/source/app.d | 16 ++++++++++++++++ 5 files changed, 29 insertions(+), 16 deletions(-) delete mode 100755 test/issue1739-project-settings-file.sh create mode 100644 test/new_tests/issue1739-project-settings-file/.gitignore create mode 100644 test/new_tests/issue1739-project-settings-file/dub.json create mode 100644 test/new_tests/issue1739-project-settings-file/sample/single.d create mode 100644 test/new_tests/issue1739-project-settings-file/source/app.d diff --git a/test/issue1739-project-settings-file.sh b/test/issue1739-project-settings-file.sh deleted file mode 100755 index efc4f3dbba..0000000000 --- a/test/issue1739-project-settings-file.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env bash -. $(dirname "${BASH_SOURCE[0]}")/common.sh - -cd ${CURR_DIR} -echo "{\"defaultArchitecture\": \"foo\"}" > "dub.settings.json" - -function cleanup { - rm "dub.settings.json" -} - -trap cleanup EXIT - -if ! { ${DUB} describe --single issue103-single-file-package.d 2>&1 || true; } | grep -cF "Unsupported architecture: foo"; then - die $LINENO 'DUB did not find the project configuration with an adjacent architecture.' -fi - diff --git a/test/new_tests/issue1739-project-settings-file/.gitignore b/test/new_tests/issue1739-project-settings-file/.gitignore new file mode 100644 index 0000000000..c1917c4843 --- /dev/null +++ b/test/new_tests/issue1739-project-settings-file/.gitignore @@ -0,0 +1,3 @@ +/sample/** +!/sample +!/sample/single.d diff --git a/test/new_tests/issue1739-project-settings-file/dub.json b/test/new_tests/issue1739-project-settings-file/dub.json new file mode 100644 index 0000000000..a4edb88656 --- /dev/null +++ b/test/new_tests/issue1739-project-settings-file/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue1739-project-settings-file", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/new_tests/issue1739-project-settings-file/sample/single.d b/test/new_tests/issue1739-project-settings-file/sample/single.d new file mode 100644 index 0000000000..4e6e05716f --- /dev/null +++ b/test/new_tests/issue1739-project-settings-file/sample/single.d @@ -0,0 +1,2 @@ +/+ dub.sdl: name "issue1739-project-settings-file-test +/ +void main () {} diff --git a/test/new_tests/issue1739-project-settings-file/source/app.d b/test/new_tests/issue1739-project-settings-file/source/app.d new file mode 100644 index 0000000000..28c79caec6 --- /dev/null +++ b/test/new_tests/issue1739-project-settings-file/source/app.d @@ -0,0 +1,16 @@ +import common; + +import std.algorithm; +import std.file; +import std.path; +import std.process; + +void main () { + chdir("sample"); + write("dub.settings.json", `{"defaultArchitecture": "foo"}`); + + auto p = teeProcess([dub, "describe", "--single", "single.d"], Redirect.stdout | Redirect.stderrToStdout); + p.wait; + if (!p.stdout.canFind("Unsupported architecture: foo")) + die("DUB did not find the project configuration with an adjacent architecture."); +} From c4379911438d7586d2d3559abcef768c5f800b89 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sun, 20 Jul 2025 19:16:08 +0300 Subject: [PATCH 105/187] issue1773-lint Signed-off-by: Andrei Horodniceanu --- test/issue1773-lint.sh | 13 ----------- test/issue1773-lint/.gitignore | 8 ------- test/issue1773-lint/.no_build | 0 test/new_tests/issue1773-lint/.gitignore | 5 ++++ test/new_tests/issue1773-lint/dub.json | 8 +++++++ .../issue1773-lint/sample}/dub.json | 2 +- .../issue1773-lint/sample}/source/app.d | 0 test/new_tests/issue1773-lint/source/app.d | 23 +++++++++++++++++++ 8 files changed, 37 insertions(+), 22 deletions(-) delete mode 100755 test/issue1773-lint.sh delete mode 100644 test/issue1773-lint/.gitignore delete mode 100644 test/issue1773-lint/.no_build create mode 100644 test/new_tests/issue1773-lint/.gitignore create mode 100644 test/new_tests/issue1773-lint/dub.json rename test/{issue1773-lint => new_tests/issue1773-lint/sample}/dub.json (90%) rename test/{issue1773-lint => new_tests/issue1773-lint/sample}/source/app.d (100%) create mode 100644 test/new_tests/issue1773-lint/source/app.d diff --git a/test/issue1773-lint.sh b/test/issue1773-lint.sh deleted file mode 100755 index 5a95f51a8f..0000000000 --- a/test/issue1773-lint.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash -. $(dirname "${BASH_SOURCE[0]}")/common.sh -cd ${CURR_DIR}/issue1773-lint -rm -rf report.json - -if ! { ${DUB} lint || true; } | grep -cF "Parameter args is never used."; then - die $LINENO 'DUB lint did not find expected warning.' -fi - -${DUB} lint --report-file report.json -if ! grep -c -e "Parameter args is never used." report.json; then - die $LINENO 'Linter report did not contain expected warning.' -fi diff --git a/test/issue1773-lint/.gitignore b/test/issue1773-lint/.gitignore deleted file mode 100644 index 304e9559a5..0000000000 --- a/test/issue1773-lint/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -.dub -docs.json -__dummy.html -docs/ -*.exe -*.o -*.obj -*.lst diff --git a/test/issue1773-lint/.no_build b/test/issue1773-lint/.no_build deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/new_tests/issue1773-lint/.gitignore b/test/new_tests/issue1773-lint/.gitignore new file mode 100644 index 0000000000..20656516f1 --- /dev/null +++ b/test/new_tests/issue1773-lint/.gitignore @@ -0,0 +1,5 @@ +/sample/** +!/sample/ +!/sample/dub.json +!/sample/source/ +!/sample/source/*.d diff --git a/test/new_tests/issue1773-lint/dub.json b/test/new_tests/issue1773-lint/dub.json new file mode 100644 index 0000000000..50ec3d0975 --- /dev/null +++ b/test/new_tests/issue1773-lint/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue1773-lint", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/issue1773-lint/dub.json b/test/new_tests/issue1773-lint/sample/dub.json similarity index 90% rename from test/issue1773-lint/dub.json rename to test/new_tests/issue1773-lint/sample/dub.json index 016de7e97a..5f6ad1f446 100644 --- a/test/issue1773-lint/dub.json +++ b/test/new_tests/issue1773-lint/sample/dub.json @@ -1,3 +1,3 @@ { "name": "test" -} \ No newline at end of file +} diff --git a/test/issue1773-lint/source/app.d b/test/new_tests/issue1773-lint/sample/source/app.d similarity index 100% rename from test/issue1773-lint/source/app.d rename to test/new_tests/issue1773-lint/sample/source/app.d diff --git a/test/new_tests/issue1773-lint/source/app.d b/test/new_tests/issue1773-lint/source/app.d new file mode 100644 index 0000000000..6b8d77b256 --- /dev/null +++ b/test/new_tests/issue1773-lint/source/app.d @@ -0,0 +1,23 @@ +import common; + +import std.algorithm; +import std.file; +import std.path; +import std.process; +import std.stdio : stdout; + +void main () { + chdir("sample"); + if (exists("report.json")) remove("report.json"); + + auto p = teeProcess([dub, "lint"], Redirect.stdout); + p.wait; + if (!p.stdout.canFind("Parameter args is never used.")) + die("DUB lint did not find expected warning."); + + if (spawnProcess([dub, "lint", "--report-file", "report.json"]).wait != 0) + die("Dub lint --report-file failed"); + + if (!readText("report.json").canFind("Parameter args is never used.")) + die("Linter report did not contain expected warning."); +} From d6e418d32f5070ceabe5c25faa153957dc754748 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sun, 20 Jul 2025 19:19:25 +0300 Subject: [PATCH 106/187] issue1775 Signed-off-by: Andrei Horodniceanu --- test/issue1775/.no_run | 0 test/issue1775/.no_test | 0 test/new_tests/issue1775/.gitignore | 1 + test/{ => new_tests}/issue1775/dub.json | 2 +- test/{ => new_tests}/issue1775/issue1775.marker | 0 test/{ => new_tests}/issue1775/source/app.d | 0 6 files changed, 2 insertions(+), 1 deletion(-) delete mode 100644 test/issue1775/.no_run delete mode 100644 test/issue1775/.no_test create mode 100644 test/new_tests/issue1775/.gitignore rename test/{ => new_tests}/issue1775/dub.json (87%) rename test/{ => new_tests}/issue1775/issue1775.marker (100%) rename test/{ => new_tests}/issue1775/source/app.d (100%) diff --git a/test/issue1775/.no_run b/test/issue1775/.no_run deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/issue1775/.no_test b/test/issue1775/.no_test deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/new_tests/issue1775/.gitignore b/test/new_tests/issue1775/.gitignore new file mode 100644 index 0000000000..33c406f88c --- /dev/null +++ b/test/new_tests/issue1775/.gitignore @@ -0,0 +1 @@ +!/issue1775.marker \ No newline at end of file diff --git a/test/issue1775/dub.json b/test/new_tests/issue1775/dub.json similarity index 87% rename from test/issue1775/dub.json rename to test/new_tests/issue1775/dub.json index f1273ef2b6..2820cd2753 100644 --- a/test/issue1775/dub.json +++ b/test/new_tests/issue1775/dub.json @@ -1,5 +1,5 @@ { - "name": "test", + "name": "issue1775", "targetName": "test-application", "preBuildCommands-posix": [ "[ -f issue1775.marker ]" ], "preBuildCommands-windows": [ "if not exist issue1775.marker exit /b 1" ] diff --git a/test/issue1775/issue1775.marker b/test/new_tests/issue1775/issue1775.marker similarity index 100% rename from test/issue1775/issue1775.marker rename to test/new_tests/issue1775/issue1775.marker diff --git a/test/issue1775/source/app.d b/test/new_tests/issue1775/source/app.d similarity index 100% rename from test/issue1775/source/app.d rename to test/new_tests/issue1775/source/app.d From a2113c8f249853a741168424c7424e57f373a8dd Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sun, 20 Jul 2025 19:21:56 +0300 Subject: [PATCH 107/187] issue1788-incomplete-string-import-override Signed-off-by: Andrei Horodniceanu --- test/issue1788-incomplete-string-import-override/b/dub.sdl | 1 - test/issue1788-incomplete-string-import-override/c/dub.sdl | 1 - test/issue1788-incomplete-string-import-override/dub.sdl | 4 ---- .../issue1788-incomplete-string-import-override/.gitignore | 3 +++ .../issue1788-incomplete-string-import-override/b/dub.sdl | 1 + .../b/source/b/foo.d | 0 .../b/views/layout.diet | 0 .../issue1788-incomplete-string-import-override/c/dub.sdl | 1 + .../c/source/dummy.d | 0 .../c/views/fancylayout.diet | 0 .../issue1788-incomplete-string-import-override/dub.sdl | 4 ++++ .../issue1788-incomplete-string-import-override/source/app.d | 0 .../views/layout.diet | 0 13 files changed, 9 insertions(+), 6 deletions(-) delete mode 100644 test/issue1788-incomplete-string-import-override/b/dub.sdl delete mode 100644 test/issue1788-incomplete-string-import-override/c/dub.sdl delete mode 100644 test/issue1788-incomplete-string-import-override/dub.sdl create mode 100644 test/new_tests/issue1788-incomplete-string-import-override/.gitignore create mode 100644 test/new_tests/issue1788-incomplete-string-import-override/b/dub.sdl rename test/{ => new_tests}/issue1788-incomplete-string-import-override/b/source/b/foo.d (100%) rename test/{ => new_tests}/issue1788-incomplete-string-import-override/b/views/layout.diet (100%) create mode 100644 test/new_tests/issue1788-incomplete-string-import-override/c/dub.sdl rename test/{ => new_tests}/issue1788-incomplete-string-import-override/c/source/dummy.d (100%) rename test/{ => new_tests}/issue1788-incomplete-string-import-override/c/views/fancylayout.diet (100%) create mode 100644 test/new_tests/issue1788-incomplete-string-import-override/dub.sdl rename test/{ => new_tests}/issue1788-incomplete-string-import-override/source/app.d (100%) rename test/{ => new_tests}/issue1788-incomplete-string-import-override/views/layout.diet (100%) diff --git a/test/issue1788-incomplete-string-import-override/b/dub.sdl b/test/issue1788-incomplete-string-import-override/b/dub.sdl deleted file mode 100644 index ad65ed5946..0000000000 --- a/test/issue1788-incomplete-string-import-override/b/dub.sdl +++ /dev/null @@ -1 +0,0 @@ -name "b" diff --git a/test/issue1788-incomplete-string-import-override/c/dub.sdl b/test/issue1788-incomplete-string-import-override/c/dub.sdl deleted file mode 100644 index 1ed791a15b..0000000000 --- a/test/issue1788-incomplete-string-import-override/c/dub.sdl +++ /dev/null @@ -1 +0,0 @@ -name "c" diff --git a/test/issue1788-incomplete-string-import-override/dub.sdl b/test/issue1788-incomplete-string-import-override/dub.sdl deleted file mode 100644 index 41999718ad..0000000000 --- a/test/issue1788-incomplete-string-import-override/dub.sdl +++ /dev/null @@ -1,4 +0,0 @@ -name "a" - -dependency "b" path="b" -dependency "c" path="c" diff --git a/test/new_tests/issue1788-incomplete-string-import-override/.gitignore b/test/new_tests/issue1788-incomplete-string-import-override/.gitignore new file mode 100644 index 0000000000..1cfb69524b --- /dev/null +++ b/test/new_tests/issue1788-incomplete-string-import-override/.gitignore @@ -0,0 +1,3 @@ +!/b +!/c +!/views \ No newline at end of file diff --git a/test/new_tests/issue1788-incomplete-string-import-override/b/dub.sdl b/test/new_tests/issue1788-incomplete-string-import-override/b/dub.sdl new file mode 100644 index 0000000000..5c685b44a8 --- /dev/null +++ b/test/new_tests/issue1788-incomplete-string-import-override/b/dub.sdl @@ -0,0 +1 @@ +name "issue1788-b" diff --git a/test/issue1788-incomplete-string-import-override/b/source/b/foo.d b/test/new_tests/issue1788-incomplete-string-import-override/b/source/b/foo.d similarity index 100% rename from test/issue1788-incomplete-string-import-override/b/source/b/foo.d rename to test/new_tests/issue1788-incomplete-string-import-override/b/source/b/foo.d diff --git a/test/issue1788-incomplete-string-import-override/b/views/layout.diet b/test/new_tests/issue1788-incomplete-string-import-override/b/views/layout.diet similarity index 100% rename from test/issue1788-incomplete-string-import-override/b/views/layout.diet rename to test/new_tests/issue1788-incomplete-string-import-override/b/views/layout.diet diff --git a/test/new_tests/issue1788-incomplete-string-import-override/c/dub.sdl b/test/new_tests/issue1788-incomplete-string-import-override/c/dub.sdl new file mode 100644 index 0000000000..0b01efcb96 --- /dev/null +++ b/test/new_tests/issue1788-incomplete-string-import-override/c/dub.sdl @@ -0,0 +1 @@ +name "issue1788-c" diff --git a/test/issue1788-incomplete-string-import-override/c/source/dummy.d b/test/new_tests/issue1788-incomplete-string-import-override/c/source/dummy.d similarity index 100% rename from test/issue1788-incomplete-string-import-override/c/source/dummy.d rename to test/new_tests/issue1788-incomplete-string-import-override/c/source/dummy.d diff --git a/test/issue1788-incomplete-string-import-override/c/views/fancylayout.diet b/test/new_tests/issue1788-incomplete-string-import-override/c/views/fancylayout.diet similarity index 100% rename from test/issue1788-incomplete-string-import-override/c/views/fancylayout.diet rename to test/new_tests/issue1788-incomplete-string-import-override/c/views/fancylayout.diet diff --git a/test/new_tests/issue1788-incomplete-string-import-override/dub.sdl b/test/new_tests/issue1788-incomplete-string-import-override/dub.sdl new file mode 100644 index 0000000000..470241040e --- /dev/null +++ b/test/new_tests/issue1788-incomplete-string-import-override/dub.sdl @@ -0,0 +1,4 @@ +name "issue1788-a" + +dependency "issue1788-b" path="b" +dependency "issue1788-c" path="c" diff --git a/test/issue1788-incomplete-string-import-override/source/app.d b/test/new_tests/issue1788-incomplete-string-import-override/source/app.d similarity index 100% rename from test/issue1788-incomplete-string-import-override/source/app.d rename to test/new_tests/issue1788-incomplete-string-import-override/source/app.d diff --git a/test/issue1788-incomplete-string-import-override/views/layout.diet b/test/new_tests/issue1788-incomplete-string-import-override/views/layout.diet similarity index 100% rename from test/issue1788-incomplete-string-import-override/views/layout.diet rename to test/new_tests/issue1788-incomplete-string-import-override/views/layout.diet From b7827ec7398a563fed6369a678dbe7a90f729865 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sun, 20 Jul 2025 19:59:31 +0300 Subject: [PATCH 108/187] issue1856-build-unittest Signed-off-by: Andrei Horodniceanu --- test/issue1856-build-unittest.sh | 69 ------------------- .../issue1856-build-unittest/.gitignore | 6 ++ .../issue1856-build-unittest/dub.json | 8 +++ .../issue1856-build-unittest/sample/full_ut.d | 9 +++ .../issue1856-build-unittest/sample/no_ut.d | 5 ++ .../sample/partial_ut.d | 8 +++ .../sample/partial_ut2.d | 9 +++ .../issue1856-build-unittest/source/app.d | 41 +++++++++++ 8 files changed, 86 insertions(+), 69 deletions(-) delete mode 100755 test/issue1856-build-unittest.sh create mode 100644 test/new_tests/issue1856-build-unittest/.gitignore create mode 100644 test/new_tests/issue1856-build-unittest/dub.json create mode 100644 test/new_tests/issue1856-build-unittest/sample/full_ut.d create mode 100644 test/new_tests/issue1856-build-unittest/sample/no_ut.d create mode 100644 test/new_tests/issue1856-build-unittest/sample/partial_ut.d create mode 100644 test/new_tests/issue1856-build-unittest/sample/partial_ut2.d create mode 100644 test/new_tests/issue1856-build-unittest/source/app.d diff --git a/test/issue1856-build-unittest.sh b/test/issue1856-build-unittest.sh deleted file mode 100755 index 2819b31c31..0000000000 --- a/test/issue1856-build-unittest.sh +++ /dev/null @@ -1,69 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -TMPDIR=$(mktemp -d "$(basename "$0").XXXXXX") - -function cleanup { - rm -rf "$TMPDIR" -} -trap cleanup EXIT - -# no unittest config -cat > "$TMPDIR/no_ut.d" < "$TMPDIR/partial_ut.d" < "$TMPDIR/partial_ut2.d" < "$TMPDIR/full_ut.d" < Date: Mon, 21 Jul 2025 21:39:33 +0300 Subject: [PATCH 109/187] issue1867-lowmem Signed-off-by: Andrei Horodniceanu --- test/issue1867-lowmem.sh | 19 ------------ test/issue1867-lowmem/.gitignore | 15 ---------- test/issue1867-lowmem/.no_build | 0 test/issue1867-lowmem/.no_run | 0 test/issue1867-lowmem/.no_test | 0 test/issue1867-lowmem/dub.sdl | 1 - test/new_tests/issue1867-lowmem/.gitignore | 6 ++++ test/new_tests/issue1867-lowmem/dub.json | 8 +++++ .../new_tests/issue1867-lowmem/sample/dub.sdl | 1 + .../sample}/dub.settings.json | 0 .../issue1867-lowmem/sample}/source/app.d | 0 test/new_tests/issue1867-lowmem/source/app.d | 30 +++++++++++++++++++ 12 files changed, 45 insertions(+), 35 deletions(-) delete mode 100755 test/issue1867-lowmem.sh delete mode 100644 test/issue1867-lowmem/.gitignore delete mode 100644 test/issue1867-lowmem/.no_build delete mode 100644 test/issue1867-lowmem/.no_run delete mode 100644 test/issue1867-lowmem/.no_test delete mode 100644 test/issue1867-lowmem/dub.sdl create mode 100644 test/new_tests/issue1867-lowmem/.gitignore create mode 100644 test/new_tests/issue1867-lowmem/dub.json create mode 100644 test/new_tests/issue1867-lowmem/sample/dub.sdl rename test/{issue1867-lowmem => new_tests/issue1867-lowmem/sample}/dub.settings.json (100%) rename test/{issue1867-lowmem => new_tests/issue1867-lowmem/sample}/source/app.d (100%) create mode 100644 test/new_tests/issue1867-lowmem/source/app.d diff --git a/test/issue1867-lowmem.sh b/test/issue1867-lowmem.sh deleted file mode 100755 index 6a396539d8..0000000000 --- a/test/issue1867-lowmem.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env bash -. $(dirname "${BASH_SOURCE[0]}")/common.sh -DIR=$(dirname "${BASH_SOURCE[0]}") - -if ! { ${DUB} build --root ${DIR}/issue1867-lowmem -v -f 2>&1 || true; } | grep -cF " -lowmem " > /dev/null; then - die $LINENO 'DUB build with lowmem did not find -lowmem option.' -fi - -if ! { ${DUB} test --root ${DIR}/issue1867-lowmem -v -f 2>&1 || true; } | grep -cF " -lowmem " > /dev/null; then - die $LINENO 'DUB test with lowmem did not find -lowmem option.' -fi - -if ! { ${DUB} run --root ${DIR}/issue1867-lowmem -v -f 2>&1 || true; } | grep -cF " -lowmem " > /dev/null; then - die $LINENO 'DUB test with lowmem did not find -lowmem option.' -fi - -if ! { ${DUB} describe --root ${DIR}/issue1867-lowmem --data=options --data-list --verror 2>&1 || true; } | grep -cF "lowmem" > /dev/null; then - die $LINENO 'DUB describe --data=options --data-list with lowmem did not find lowmem option.' -fi diff --git a/test/issue1867-lowmem/.gitignore b/test/issue1867-lowmem/.gitignore deleted file mode 100644 index 3b21cd57ad..0000000000 --- a/test/issue1867-lowmem/.gitignore +++ /dev/null @@ -1,15 +0,0 @@ -.dub -docs.json -__dummy.html -docs/ -/issue1867-lowmem -issue1867-lowmem.so -issue1867-lowmem.dylib -issue1867-lowmem.dll -issue1867-lowmem.a -issue1867-lowmem.lib -issue1867-lowmem-test-* -*.exe -*.o -*.obj -*.lst diff --git a/test/issue1867-lowmem/.no_build b/test/issue1867-lowmem/.no_build deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/issue1867-lowmem/.no_run b/test/issue1867-lowmem/.no_run deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/issue1867-lowmem/.no_test b/test/issue1867-lowmem/.no_test deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/issue1867-lowmem/dub.sdl b/test/issue1867-lowmem/dub.sdl deleted file mode 100644 index 2cf20c897f..0000000000 --- a/test/issue1867-lowmem/dub.sdl +++ /dev/null @@ -1 +0,0 @@ -name "issue1867-lowmem" diff --git a/test/new_tests/issue1867-lowmem/.gitignore b/test/new_tests/issue1867-lowmem/.gitignore new file mode 100644 index 0000000000..a923a39e94 --- /dev/null +++ b/test/new_tests/issue1867-lowmem/.gitignore @@ -0,0 +1,6 @@ +/sample/** +!/sample/ +!/sample/dub.sdl +!/sample/dub.settings.json +!/sample/source/ +!/sample/source/*.d diff --git a/test/new_tests/issue1867-lowmem/dub.json b/test/new_tests/issue1867-lowmem/dub.json new file mode 100644 index 0000000000..f5ad805598 --- /dev/null +++ b/test/new_tests/issue1867-lowmem/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue1867-lowmem", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/new_tests/issue1867-lowmem/sample/dub.sdl b/test/new_tests/issue1867-lowmem/sample/dub.sdl new file mode 100644 index 0000000000..4d7c353344 --- /dev/null +++ b/test/new_tests/issue1867-lowmem/sample/dub.sdl @@ -0,0 +1 @@ +name "issue1867-lowmem" \ No newline at end of file diff --git a/test/issue1867-lowmem/dub.settings.json b/test/new_tests/issue1867-lowmem/sample/dub.settings.json similarity index 100% rename from test/issue1867-lowmem/dub.settings.json rename to test/new_tests/issue1867-lowmem/sample/dub.settings.json diff --git a/test/issue1867-lowmem/source/app.d b/test/new_tests/issue1867-lowmem/sample/source/app.d similarity index 100% rename from test/issue1867-lowmem/source/app.d rename to test/new_tests/issue1867-lowmem/sample/source/app.d diff --git a/test/new_tests/issue1867-lowmem/source/app.d b/test/new_tests/issue1867-lowmem/source/app.d new file mode 100644 index 0000000000..f126de8fef --- /dev/null +++ b/test/new_tests/issue1867-lowmem/source/app.d @@ -0,0 +1,30 @@ +import common; + +import std.algorithm; +import std.file; +import std.path; +import std.process; + +void main () { + if (!execute([dub, "build", "--root=sample", "-v", "-f"]).output.canFind(" -lowmem ")) + die("DUB build with lowmem did not find -lowmem option."); + + if (!execute([dub, "test", "--root=sample", "-v", "-f"]).output.canFind(" -lowmem ")) + die("DUB test with lowmem did not find -lowmem option."); + + if (!execute([dub, "run", "--root=sample", "-v", "-f"]).output.canFind(" -lowmem ")) + die("DUB test with lowmem did not find -lowmem option."); + + immutable describeCmd = [ + dub, + "describe", + "--root=sample", + "--data=options", + "--data-list", + "--verror" + ]; + auto p = teeProcess(describeCmd); + p.wait; + if (!p.stdout.canFind("lowmem")) + die("DUB describe --data=options --data-list with lowmem did not find lowmem option."); +} From 0853bdb343908c941beb23fee2f0d175865ae8d3 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Mon, 21 Jul 2025 22:00:11 +0300 Subject: [PATCH 110/187] issue2046-ignored-optional-with-path Signed-off-by: Andrei Horodniceanu --- .../.no_build | 0 .../.no_run | 0 .../.no_test | 0 .../.gitignore | 8 +++++++ .../dub.json | 8 +++++++ .../sample}/dub.json | 0 .../sample}/dub.selections.json-nofoo | 0 .../sample}/dub.selections.json-usefoo | 0 .../sample}/libbar/dub.json | 0 .../sample}/libbar/source/libbar/bar.d | 0 .../sample}/libfoo/dub.json | 0 .../sample}/libfoo/source/libfoo/foo.d | 0 .../sample}/source/app.d | 0 .../source/app.d | 22 +++++++++++++++++++ 14 files changed, 38 insertions(+) delete mode 100644 test/issue2046-ignored-optional-with-path/.no_build delete mode 100644 test/issue2046-ignored-optional-with-path/.no_run delete mode 100644 test/issue2046-ignored-optional-with-path/.no_test create mode 100644 test/new_tests/issue2046-ignored-optional-with-path/.gitignore create mode 100644 test/new_tests/issue2046-ignored-optional-with-path/dub.json rename test/{issue2046-ignored-optional-with-path => new_tests/issue2046-ignored-optional-with-path/sample}/dub.json (100%) rename test/{issue2046-ignored-optional-with-path => new_tests/issue2046-ignored-optional-with-path/sample}/dub.selections.json-nofoo (100%) rename test/{issue2046-ignored-optional-with-path => new_tests/issue2046-ignored-optional-with-path/sample}/dub.selections.json-usefoo (100%) rename test/{issue2046-ignored-optional-with-path => new_tests/issue2046-ignored-optional-with-path/sample}/libbar/dub.json (100%) rename test/{issue2046-ignored-optional-with-path => new_tests/issue2046-ignored-optional-with-path/sample}/libbar/source/libbar/bar.d (100%) rename test/{issue2046-ignored-optional-with-path => new_tests/issue2046-ignored-optional-with-path/sample}/libfoo/dub.json (100%) rename test/{issue2046-ignored-optional-with-path => new_tests/issue2046-ignored-optional-with-path/sample}/libfoo/source/libfoo/foo.d (100%) rename test/{issue2046-ignored-optional-with-path => new_tests/issue2046-ignored-optional-with-path/sample}/source/app.d (100%) create mode 100644 test/new_tests/issue2046-ignored-optional-with-path/source/app.d diff --git a/test/issue2046-ignored-optional-with-path/.no_build b/test/issue2046-ignored-optional-with-path/.no_build deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/issue2046-ignored-optional-with-path/.no_run b/test/issue2046-ignored-optional-with-path/.no_run deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/issue2046-ignored-optional-with-path/.no_test b/test/issue2046-ignored-optional-with-path/.no_test deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/new_tests/issue2046-ignored-optional-with-path/.gitignore b/test/new_tests/issue2046-ignored-optional-with-path/.gitignore new file mode 100644 index 0000000000..2441e92ab1 --- /dev/null +++ b/test/new_tests/issue2046-ignored-optional-with-path/.gitignore @@ -0,0 +1,8 @@ +/sample/* +!/sample/ +!/sample/dub.json +!/sample/dub.selections.json-nofoo +!/sample/dub.selections.json-usefoo +!/sample/libbar/ +!/sample/libfoo/ +!/sample/source/ diff --git a/test/new_tests/issue2046-ignored-optional-with-path/dub.json b/test/new_tests/issue2046-ignored-optional-with-path/dub.json new file mode 100644 index 0000000000..7f5b3a6da6 --- /dev/null +++ b/test/new_tests/issue2046-ignored-optional-with-path/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue2046-ignored-optional-with-path", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/issue2046-ignored-optional-with-path/dub.json b/test/new_tests/issue2046-ignored-optional-with-path/sample/dub.json similarity index 100% rename from test/issue2046-ignored-optional-with-path/dub.json rename to test/new_tests/issue2046-ignored-optional-with-path/sample/dub.json diff --git a/test/issue2046-ignored-optional-with-path/dub.selections.json-nofoo b/test/new_tests/issue2046-ignored-optional-with-path/sample/dub.selections.json-nofoo similarity index 100% rename from test/issue2046-ignored-optional-with-path/dub.selections.json-nofoo rename to test/new_tests/issue2046-ignored-optional-with-path/sample/dub.selections.json-nofoo diff --git a/test/issue2046-ignored-optional-with-path/dub.selections.json-usefoo b/test/new_tests/issue2046-ignored-optional-with-path/sample/dub.selections.json-usefoo similarity index 100% rename from test/issue2046-ignored-optional-with-path/dub.selections.json-usefoo rename to test/new_tests/issue2046-ignored-optional-with-path/sample/dub.selections.json-usefoo diff --git a/test/issue2046-ignored-optional-with-path/libbar/dub.json b/test/new_tests/issue2046-ignored-optional-with-path/sample/libbar/dub.json similarity index 100% rename from test/issue2046-ignored-optional-with-path/libbar/dub.json rename to test/new_tests/issue2046-ignored-optional-with-path/sample/libbar/dub.json diff --git a/test/issue2046-ignored-optional-with-path/libbar/source/libbar/bar.d b/test/new_tests/issue2046-ignored-optional-with-path/sample/libbar/source/libbar/bar.d similarity index 100% rename from test/issue2046-ignored-optional-with-path/libbar/source/libbar/bar.d rename to test/new_tests/issue2046-ignored-optional-with-path/sample/libbar/source/libbar/bar.d diff --git a/test/issue2046-ignored-optional-with-path/libfoo/dub.json b/test/new_tests/issue2046-ignored-optional-with-path/sample/libfoo/dub.json similarity index 100% rename from test/issue2046-ignored-optional-with-path/libfoo/dub.json rename to test/new_tests/issue2046-ignored-optional-with-path/sample/libfoo/dub.json diff --git a/test/issue2046-ignored-optional-with-path/libfoo/source/libfoo/foo.d b/test/new_tests/issue2046-ignored-optional-with-path/sample/libfoo/source/libfoo/foo.d similarity index 100% rename from test/issue2046-ignored-optional-with-path/libfoo/source/libfoo/foo.d rename to test/new_tests/issue2046-ignored-optional-with-path/sample/libfoo/source/libfoo/foo.d diff --git a/test/issue2046-ignored-optional-with-path/source/app.d b/test/new_tests/issue2046-ignored-optional-with-path/sample/source/app.d similarity index 100% rename from test/issue2046-ignored-optional-with-path/source/app.d rename to test/new_tests/issue2046-ignored-optional-with-path/sample/source/app.d diff --git a/test/new_tests/issue2046-ignored-optional-with-path/source/app.d b/test/new_tests/issue2046-ignored-optional-with-path/source/app.d new file mode 100644 index 0000000000..213a7b0c7c --- /dev/null +++ b/test/new_tests/issue2046-ignored-optional-with-path/source/app.d @@ -0,0 +1,22 @@ +import common; + +import std.algorithm; +import std.file; +import std.path; +import std.process; +import std.stdio; + +void main () { + chdir("sample"); + + copy("dub.selections.json-nofoo", "dub.selections.json"); + auto p = teeProcess([dub, "-f"], Redirect.stdout | Redirect.stderrToStdout); + p.wait; + if (!p.stdout.canFind("no-foo")) + die("DUB didn't ignore the optional dependency when it wasn't present in dub.selections.json"); + + copy("dub.selections.json-usefoo", "dub.selections.json"); + p = teeProcess([dub, "-f"], Redirect.stdout | Redirect.stderrToStdout); + if (!p.stdout.canFind("use-foo")) + die("DUB didn't ignore the optional dependency when it wasn't present in dub.selections.json"); +} From 4b0bf19e15bba1f222030bfa6d6d6f2c004410ef Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Mon, 21 Jul 2025 22:09:26 +0300 Subject: [PATCH 111/187] issue2051_running_unittests_from_dub_single_file_packages_fails Signed-off-by: Andrei Horodniceanu --- ...ests_from_dub_single_file_packages_fails.d | 103 ------------------ .../.gitignore | 2 + .../dub.json | 8 ++ .../single_failure.d | 14 +++ .../single_success.d | 23 ++++ .../source/app.d | 17 +++ 6 files changed, 64 insertions(+), 103 deletions(-) delete mode 100644 test/issue2051_running_unittests_from_dub_single_file_packages_fails.d create mode 100644 test/new_tests/issue2051_running_unittests_from_dub_single_file_packages_fails/.gitignore create mode 100644 test/new_tests/issue2051_running_unittests_from_dub_single_file_packages_fails/dub.json create mode 100644 test/new_tests/issue2051_running_unittests_from_dub_single_file_packages_fails/single_failure.d create mode 100644 test/new_tests/issue2051_running_unittests_from_dub_single_file_packages_fails/single_success.d create mode 100644 test/new_tests/issue2051_running_unittests_from_dub_single_file_packages_fails/source/app.d diff --git a/test/issue2051_running_unittests_from_dub_single_file_packages_fails.d b/test/issue2051_running_unittests_from_dub_single_file_packages_fails.d deleted file mode 100644 index daa6ae870d..0000000000 --- a/test/issue2051_running_unittests_from_dub_single_file_packages_fails.d +++ /dev/null @@ -1,103 +0,0 @@ -/+ dub.sdl: - name "issue2051" - +/ - -import std.algorithm : any; -import std.conv : text; -import std.file : tempDir; -import std.stdio : File, writeln; -import std.string : lineSplitter; -import std.path : buildPath, buildNormalizedPath; -import std.process : environment, executeShell; - -auto executeCommand(string command) -{ - import std.exception : enforce; - - auto dub = executeShell(command); - writeln("--- dub output:"); - foreach(line; dub.output.lineSplitter) - writeln("\t", line); - writeln("--- end of dub output"); - - return dub.status; -} - -int main() -{ - auto dub = environment.get("DUB"); - if (!dub.length) - dub = buildPath(".", "bin", "dub"); - - string destinationDirectory = tempDir; - // remove any ending slahes (which can for some reason be added at the end by tempDir, which fails on OSX) https://issues.dlang.org/show_bug.cgi?id=22738 - destinationDirectory = buildNormalizedPath(destinationDirectory); - - string filename; - // check if the single file package with dependency compiles and runs - { - filename = destinationDirectory.buildPath("issue2051_success.d"); - auto f = File(filename, "w"); - f.write( -`#!/usr/bin/env dub -/+ dub.sdl: - name "issue2051" - dependency "taggedalgebraic" version="~>0.11.0" -+/ - -version(unittest) {} -else void main() -{ -} - -unittest -{ - import taggedalgebraic; - - static union Base { - int i; - string str; - } - - auto dummy = TaggedAlgebraic!Base(1721); - assert(dummy == 1721); -} -` ); - } - - const rc1 = text(dub, " test --single \"", filename, "\"").executeCommand; - if (rc1) - writeln("\nError. Unittests failed."); - else - writeln("\nOk. Unittest passed."); - - // Check if dub `test` command runs unittests for single file package - { - filename = destinationDirectory.buildPath("issue2051_fail.d"); - auto f = File(filename, "w"); - f.write( -`#!/usr/bin/env dub -/+ dub.sdl: - name "issue2051" -+/ - -version(unittest) {} -else void main() -{ -} - -unittest -{ - assert(0); -} -` ); - } - - const rc2 = text(dub, " test --single \"", filename, "\"").executeCommand; - if (rc2) - writeln("\nOk. Unittests failed."); - else - writeln("\nError. Unittest passed."); - - return rc1 | !rc2; -} diff --git a/test/new_tests/issue2051_running_unittests_from_dub_single_file_packages_fails/.gitignore b/test/new_tests/issue2051_running_unittests_from_dub_single_file_packages_fails/.gitignore new file mode 100644 index 0000000000..c67e247b8a --- /dev/null +++ b/test/new_tests/issue2051_running_unittests_from_dub_single_file_packages_fails/.gitignore @@ -0,0 +1,2 @@ +!/single_success.d +!/single_failure.d diff --git a/test/new_tests/issue2051_running_unittests_from_dub_single_file_packages_fails/dub.json b/test/new_tests/issue2051_running_unittests_from_dub_single_file_packages_fails/dub.json new file mode 100644 index 0000000000..8d2ec2a4f6 --- /dev/null +++ b/test/new_tests/issue2051_running_unittests_from_dub_single_file_packages_fails/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue2051_running_unittests_from_dub_single_file_packages_fails", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/new_tests/issue2051_running_unittests_from_dub_single_file_packages_fails/single_failure.d b/test/new_tests/issue2051_running_unittests_from_dub_single_file_packages_fails/single_failure.d new file mode 100644 index 0000000000..a1dbeeb30b --- /dev/null +++ b/test/new_tests/issue2051_running_unittests_from_dub_single_file_packages_fails/single_failure.d @@ -0,0 +1,14 @@ +#!/usr/bin/env dub +/+ dub.sdl: + name "issue2051-failure" ++/ + +version(unittest) {} +else void main() +{ +} + +unittest +{ + assert(0); +} diff --git a/test/new_tests/issue2051_running_unittests_from_dub_single_file_packages_fails/single_success.d b/test/new_tests/issue2051_running_unittests_from_dub_single_file_packages_fails/single_success.d new file mode 100644 index 0000000000..60a978b082 --- /dev/null +++ b/test/new_tests/issue2051_running_unittests_from_dub_single_file_packages_fails/single_success.d @@ -0,0 +1,23 @@ +#!/usr/bin/env dub +/+ dub.sdl: + name "issue2051-success" + dependency "taggedalgebraic" version="~>0.11.0" ++/ + +version(unittest) {} +else void main() +{ +} + +unittest +{ + import taggedalgebraic; + + static union Base { + int i; + string str; + } + + auto dummy = TaggedAlgebraic!Base(1721); + assert(dummy == 1721); +} diff --git a/test/new_tests/issue2051_running_unittests_from_dub_single_file_packages_fails/source/app.d b/test/new_tests/issue2051_running_unittests_from_dub_single_file_packages_fails/source/app.d new file mode 100644 index 0000000000..0551a0f78e --- /dev/null +++ b/test/new_tests/issue2051_running_unittests_from_dub_single_file_packages_fails/source/app.d @@ -0,0 +1,17 @@ +import common; + +import std.algorithm; +import std.file; +import std.path; +import std.process; + +void main () { + // DFLAGS disable unittests: https://github.com/dlang/dub/pull/3060 + environment.remove("DFLAGS"); + + if (spawnProcess([dub, "test", "--single", "single_success.d"]).wait != 0) + die("Unittest should have passed"); + + if (spawnProcess([dub, "test", "--single", "single_failure.d"]).wait == 0) + die("Unittest should have failed"); +} From a48eda0f43ec841a97c35fab0b48c726dcb5f31e Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Mon, 21 Jul 2025 22:17:14 +0300 Subject: [PATCH 112/187] issue2085-target-none-visuald Signed-off-by: Andrei Horodniceanu --- test/issue2085-target-none-visuald.sh | 10 ---------- test/issue2085-target-none-visuald/.no_build | 0 test/issue2085-target-none-visuald/.no_run | 0 .../issue2085-target-none-visuald/.gitignore | 5 +++++ .../issue2085-target-none-visuald/dub.json | 8 ++++++++ .../issue2085-target-none-visuald/sample}/dub.json | 0 .../sample}/sub/dub.json | 0 .../sample}/sub/source/app.d | 0 .../issue2085-target-none-visuald/source/app.d | 14 ++++++++++++++ 9 files changed, 27 insertions(+), 10 deletions(-) delete mode 100755 test/issue2085-target-none-visuald.sh delete mode 100644 test/issue2085-target-none-visuald/.no_build delete mode 100644 test/issue2085-target-none-visuald/.no_run create mode 100644 test/new_tests/issue2085-target-none-visuald/.gitignore create mode 100644 test/new_tests/issue2085-target-none-visuald/dub.json rename test/{issue2085-target-none-visuald => new_tests/issue2085-target-none-visuald/sample}/dub.json (100%) rename test/{issue2085-target-none-visuald => new_tests/issue2085-target-none-visuald/sample}/sub/dub.json (100%) rename test/{issue2085-target-none-visuald => new_tests/issue2085-target-none-visuald/sample}/sub/source/app.d (100%) create mode 100644 test/new_tests/issue2085-target-none-visuald/source/app.d diff --git a/test/issue2085-target-none-visuald.sh b/test/issue2085-target-none-visuald.sh deleted file mode 100755 index 8012f5ac19..0000000000 --- a/test/issue2085-target-none-visuald.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash - -. $(dirname "${BASH_SOURCE[0]}")/common.sh -cd "${CURR_DIR}/issue2085-target-none-visuald" || die "Could not cd." - -"$DUB" generate visuald - -if grep -c -e \"\" .dub/root.visualdproj; then - die $LINENO 'Regression of issue #2085.' -fi diff --git a/test/issue2085-target-none-visuald/.no_build b/test/issue2085-target-none-visuald/.no_build deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/issue2085-target-none-visuald/.no_run b/test/issue2085-target-none-visuald/.no_run deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/new_tests/issue2085-target-none-visuald/.gitignore b/test/new_tests/issue2085-target-none-visuald/.gitignore new file mode 100644 index 0000000000..2f019e7f82 --- /dev/null +++ b/test/new_tests/issue2085-target-none-visuald/.gitignore @@ -0,0 +1,5 @@ +/sample/** +!/sample/ +!/sample/dub.json +!/sample/sub/ +!/sample/sub/** diff --git a/test/new_tests/issue2085-target-none-visuald/dub.json b/test/new_tests/issue2085-target-none-visuald/dub.json new file mode 100644 index 0000000000..4aeab2a824 --- /dev/null +++ b/test/new_tests/issue2085-target-none-visuald/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue2085-target-none-visuald", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/issue2085-target-none-visuald/dub.json b/test/new_tests/issue2085-target-none-visuald/sample/dub.json similarity index 100% rename from test/issue2085-target-none-visuald/dub.json rename to test/new_tests/issue2085-target-none-visuald/sample/dub.json diff --git a/test/issue2085-target-none-visuald/sub/dub.json b/test/new_tests/issue2085-target-none-visuald/sample/sub/dub.json similarity index 100% rename from test/issue2085-target-none-visuald/sub/dub.json rename to test/new_tests/issue2085-target-none-visuald/sample/sub/dub.json diff --git a/test/issue2085-target-none-visuald/sub/source/app.d b/test/new_tests/issue2085-target-none-visuald/sample/sub/source/app.d similarity index 100% rename from test/issue2085-target-none-visuald/sub/source/app.d rename to test/new_tests/issue2085-target-none-visuald/sample/sub/source/app.d diff --git a/test/new_tests/issue2085-target-none-visuald/source/app.d b/test/new_tests/issue2085-target-none-visuald/source/app.d new file mode 100644 index 0000000000..029c777835 --- /dev/null +++ b/test/new_tests/issue2085-target-none-visuald/source/app.d @@ -0,0 +1,14 @@ +import common; + +import std.algorithm; +import std.file; +import std.path; +import std.process; + +void main () { + if (spawnProcess([dub, "generate", "visuald"], null, Config.none, "sample").wait != 0) + die("Dub generate failed"); + + if (readText("sample/.dub/root.visualdproj").canFind(``)) + die("Regression of issue #2085."); +} From b3d0c963e82bd15a0e9f15d76e2d92f5ca6348da Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Mon, 21 Jul 2025 22:23:04 +0300 Subject: [PATCH 113/187] issue2086-copyfiles-subpackage-targetpath Signed-off-by: Andrei Horodniceanu --- ...ssue2086-copyfiles-subpackage-targetpath.sh | 9 --------- .../.no_run | 0 .../.no_test | 0 .../.gitignore | 9 +++++++++ .../dub.json | 8 ++++++++ .../sample}/dub.json | 0 .../sample}/sub/dub.json | 0 .../sample}/sub/files/to_be_deployed.txt | 0 .../sample}/sub/source/app.d | 0 .../source/app.d | 18 ++++++++++++++++++ 10 files changed, 35 insertions(+), 9 deletions(-) delete mode 100755 test/issue2086-copyfiles-subpackage-targetpath.sh delete mode 100644 test/issue2086-copyfiles-subpackage-targetpath/.no_run delete mode 100644 test/issue2086-copyfiles-subpackage-targetpath/.no_test create mode 100644 test/new_tests/issue2086-copyfiles-subpackage-targetpath/.gitignore create mode 100644 test/new_tests/issue2086-copyfiles-subpackage-targetpath/dub.json rename test/{issue2086-copyfiles-subpackage-targetpath => new_tests/issue2086-copyfiles-subpackage-targetpath/sample}/dub.json (100%) rename test/{issue2086-copyfiles-subpackage-targetpath => new_tests/issue2086-copyfiles-subpackage-targetpath/sample}/sub/dub.json (100%) rename test/{issue2086-copyfiles-subpackage-targetpath => new_tests/issue2086-copyfiles-subpackage-targetpath/sample}/sub/files/to_be_deployed.txt (100%) rename test/{issue2086-copyfiles-subpackage-targetpath => new_tests/issue2086-copyfiles-subpackage-targetpath/sample}/sub/source/app.d (100%) create mode 100644 test/new_tests/issue2086-copyfiles-subpackage-targetpath/source/app.d diff --git a/test/issue2086-copyfiles-subpackage-targetpath.sh b/test/issue2086-copyfiles-subpackage-targetpath.sh deleted file mode 100755 index 9502f8cda4..0000000000 --- a/test/issue2086-copyfiles-subpackage-targetpath.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash - -. $(dirname "${BASH_SOURCE[0]}")/common.sh -cd "${CURR_DIR}/issue2086-copyfiles-subpackage-targetpath" || die "Could not cd." - -rm -f "sub/to_be_deployed.txt" - -"$DUB" build -./sub/sub diff --git a/test/issue2086-copyfiles-subpackage-targetpath/.no_run b/test/issue2086-copyfiles-subpackage-targetpath/.no_run deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/issue2086-copyfiles-subpackage-targetpath/.no_test b/test/issue2086-copyfiles-subpackage-targetpath/.no_test deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/new_tests/issue2086-copyfiles-subpackage-targetpath/.gitignore b/test/new_tests/issue2086-copyfiles-subpackage-targetpath/.gitignore new file mode 100644 index 0000000000..438f2ab5c8 --- /dev/null +++ b/test/new_tests/issue2086-copyfiles-subpackage-targetpath/.gitignore @@ -0,0 +1,9 @@ +/sample/** +!/sample/ +!/sample/dub.json +!/sample/sub/ +!/sample/sub/dub.json +!/sample/sub/files/ +!/sample/sub/files/* +!/sample/sub/source/ +!/sample/sub/source/* diff --git a/test/new_tests/issue2086-copyfiles-subpackage-targetpath/dub.json b/test/new_tests/issue2086-copyfiles-subpackage-targetpath/dub.json new file mode 100644 index 0000000000..d033f348b7 --- /dev/null +++ b/test/new_tests/issue2086-copyfiles-subpackage-targetpath/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue2086-copyfiles-subpackage-targetpath", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/issue2086-copyfiles-subpackage-targetpath/dub.json b/test/new_tests/issue2086-copyfiles-subpackage-targetpath/sample/dub.json similarity index 100% rename from test/issue2086-copyfiles-subpackage-targetpath/dub.json rename to test/new_tests/issue2086-copyfiles-subpackage-targetpath/sample/dub.json diff --git a/test/issue2086-copyfiles-subpackage-targetpath/sub/dub.json b/test/new_tests/issue2086-copyfiles-subpackage-targetpath/sample/sub/dub.json similarity index 100% rename from test/issue2086-copyfiles-subpackage-targetpath/sub/dub.json rename to test/new_tests/issue2086-copyfiles-subpackage-targetpath/sample/sub/dub.json diff --git a/test/issue2086-copyfiles-subpackage-targetpath/sub/files/to_be_deployed.txt b/test/new_tests/issue2086-copyfiles-subpackage-targetpath/sample/sub/files/to_be_deployed.txt similarity index 100% rename from test/issue2086-copyfiles-subpackage-targetpath/sub/files/to_be_deployed.txt rename to test/new_tests/issue2086-copyfiles-subpackage-targetpath/sample/sub/files/to_be_deployed.txt diff --git a/test/issue2086-copyfiles-subpackage-targetpath/sub/source/app.d b/test/new_tests/issue2086-copyfiles-subpackage-targetpath/sample/sub/source/app.d similarity index 100% rename from test/issue2086-copyfiles-subpackage-targetpath/sub/source/app.d rename to test/new_tests/issue2086-copyfiles-subpackage-targetpath/sample/sub/source/app.d diff --git a/test/new_tests/issue2086-copyfiles-subpackage-targetpath/source/app.d b/test/new_tests/issue2086-copyfiles-subpackage-targetpath/source/app.d new file mode 100644 index 0000000000..4ddf277f86 --- /dev/null +++ b/test/new_tests/issue2086-copyfiles-subpackage-targetpath/source/app.d @@ -0,0 +1,18 @@ +import common; + +import std.algorithm; +import std.file; +import std.path; +import std.process; + +void main () { + chdir("sample"); + + immutable path = "sub/to_be_deployed.txt"; + if (path.exists) path.remove; + + if (spawnProcess([dub, "build"]).wait != 0) + die("Dub build falied"); + if (spawnProcess("./sub/sub").wait != 0) + die("Running the subpackage failed"); +} From be18fccc94fea996b5f018bb88830827dd00bdf5 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Mon, 21 Jul 2025 22:28:43 +0300 Subject: [PATCH 114/187] issue2190-unset-TEMP Signed-off-by: Andrei Horodniceanu --- test/issue2190-unset-TEMP.script.d | 51 ------------------- .../new_tests/issue2190-unset-TEMP/.gitignore | 1 + test/new_tests/issue2190-unset-TEMP/dub.json | 8 +++ test/new_tests/issue2190-unset-TEMP/single.d | 10 ++++ .../issue2190-unset-TEMP/source/app.d | 13 +++++ .../issue2190-unset-TEMP/test.config | 1 + 6 files changed, 33 insertions(+), 51 deletions(-) delete mode 100644 test/issue2190-unset-TEMP.script.d create mode 100644 test/new_tests/issue2190-unset-TEMP/.gitignore create mode 100644 test/new_tests/issue2190-unset-TEMP/dub.json create mode 100644 test/new_tests/issue2190-unset-TEMP/single.d create mode 100644 test/new_tests/issue2190-unset-TEMP/source/app.d create mode 100644 test/new_tests/issue2190-unset-TEMP/test.config diff --git a/test/issue2190-unset-TEMP.script.d b/test/issue2190-unset-TEMP.script.d deleted file mode 100644 index 398695346e..0000000000 --- a/test/issue2190-unset-TEMP.script.d +++ /dev/null @@ -1,51 +0,0 @@ -/+ dub.json: { - "name": "issue2190_unset_TEMP" -} +/ - -module issue2190_unset_TEMP.script; - -int main() -{ - import std.stdio; - import std.algorithm; - import std.path; - import std.process; - - const dir = __FILE_FULL_PATH__.dirName(); - - // doesn't matter, just pick something - const file = buildPath(dir, "single-file-sdl-default-name.d"); - - const dub = environment.get("DUB", buildPath(dirName(dir), "bin", "dub.exe")); - - int exitCode; - - void runTest(scope const string[] cmd) - { - const result = execute(cmd); - - if (result.status || result.output.canFind("Failed")) - { - writefln("\n> %-(%s %)", cmd); - writeln("==========================================================="); - writeln(result.output); - writeln("==========================================================="); - writeln("Last command failed with exit code ", result.status, '\n'); - exitCode = 1; - } - } - - environment.remove("TEMP"); - - // only guaranteed to be there on Windows - // See: runDubCommandLine in commandline - version(Windows) - { - runTest([ - dub, "build", - "--single", file, - ]); - } - - return exitCode; -} diff --git a/test/new_tests/issue2190-unset-TEMP/.gitignore b/test/new_tests/issue2190-unset-TEMP/.gitignore new file mode 100644 index 0000000000..96ae139c5d --- /dev/null +++ b/test/new_tests/issue2190-unset-TEMP/.gitignore @@ -0,0 +1 @@ +!/single.d diff --git a/test/new_tests/issue2190-unset-TEMP/dub.json b/test/new_tests/issue2190-unset-TEMP/dub.json new file mode 100644 index 0000000000..9df4e85855 --- /dev/null +++ b/test/new_tests/issue2190-unset-TEMP/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue2190-unset-TEMP", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/new_tests/issue2190-unset-TEMP/single.d b/test/new_tests/issue2190-unset-TEMP/single.d new file mode 100644 index 0000000000..9a6a0e2b30 --- /dev/null +++ b/test/new_tests/issue2190-unset-TEMP/single.d @@ -0,0 +1,10 @@ +/++dub.sdl: + name "issue2190-single" ++/ +module single; + +void main() +{ + import std.stdio; + writeln("Hello, world!"); +} diff --git a/test/new_tests/issue2190-unset-TEMP/source/app.d b/test/new_tests/issue2190-unset-TEMP/source/app.d new file mode 100644 index 0000000000..63dc31a289 --- /dev/null +++ b/test/new_tests/issue2190-unset-TEMP/source/app.d @@ -0,0 +1,13 @@ +import common; + +import std.algorithm; +import std.file; +import std.path; +import std.process; + +void main () { + environment.remove("TEMP"); + + if (spawnProcess([dub, "build", "--single", "single.d"]).wait != 0) + die("dub build with unset TEMP failed"); +} diff --git a/test/new_tests/issue2190-unset-TEMP/test.config b/test/new_tests/issue2190-unset-TEMP/test.config new file mode 100644 index 0000000000..9aae66f369 --- /dev/null +++ b/test/new_tests/issue2190-unset-TEMP/test.config @@ -0,0 +1 @@ +os = windows \ No newline at end of file From 47b5b0a909cf0c2a4154f431886ae10148cd0984 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Mon, 21 Jul 2025 22:39:23 +0300 Subject: [PATCH 115/187] issue2192-environment-variables Signed-off-by: Andrei Horodniceanu --- test/issue2192-environment-variables.sh | 21 --------------- test/issue2192-environment-variables/.no_run | 0 .../.gitignore | 5 ++++ .../issue2192-environment-variables/dub.json | 8 ++++++ .../sample}/dub.sdl | 0 .../sample}/source/lib.d | 0 .../source/app.d | 26 +++++++++++++++++++ 7 files changed, 39 insertions(+), 21 deletions(-) delete mode 100755 test/issue2192-environment-variables.sh delete mode 100644 test/issue2192-environment-variables/.no_run create mode 100644 test/new_tests/issue2192-environment-variables/.gitignore create mode 100644 test/new_tests/issue2192-environment-variables/dub.json rename test/{issue2192-environment-variables => new_tests/issue2192-environment-variables/sample}/dub.sdl (100%) rename test/{issue2192-environment-variables => new_tests/issue2192-environment-variables/sample}/source/lib.d (100%) create mode 100644 test/new_tests/issue2192-environment-variables/source/app.d diff --git a/test/issue2192-environment-variables.sh b/test/issue2192-environment-variables.sh deleted file mode 100755 index df862ed9c0..0000000000 --- a/test/issue2192-environment-variables.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash -. $(dirname "${BASH_SOURCE[0]}")/common.sh - -if [ -n "${DUB_PACKAGE-}" ]; then - die $LINENO '$DUB_PACKAGE must not be set when running this test!' -fi - -if ! { $DUB build --force --root "$CURR_DIR/issue2192-environment-variables" --skip-registry=all; }; then - die $LINENO 'Failed to build package with built-in environment variables.' -fi - -if [ -s "$CURR_DIR/issue2192-environment-variables/package.txt" ]; then - rm "$CURR_DIR/issue2192-environment-variables/package.txt" -else - die $LINENO 'Expected generated package.txt file is missing.' -fi - -OUTPUT=$($DUB describe --root "$CURR_DIR/issue2192-environment-variables" --skip-registry=all --data=pre-build-commands --data-list) -if [ "$OUTPUT" != "echo 'issue2192-environment-variables' > package.txt" ]; then - die $LINENO 'describe did not contain subtituted values or the correct package name' -fi diff --git a/test/issue2192-environment-variables/.no_run b/test/issue2192-environment-variables/.no_run deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/new_tests/issue2192-environment-variables/.gitignore b/test/new_tests/issue2192-environment-variables/.gitignore new file mode 100644 index 0000000000..d4a7b052d4 --- /dev/null +++ b/test/new_tests/issue2192-environment-variables/.gitignore @@ -0,0 +1,5 @@ +/sample/** +!/sample/ +!/sample/dub.sdl +!/sample/source/ +!/sample/source/*.d diff --git a/test/new_tests/issue2192-environment-variables/dub.json b/test/new_tests/issue2192-environment-variables/dub.json new file mode 100644 index 0000000000..5fb9e09855 --- /dev/null +++ b/test/new_tests/issue2192-environment-variables/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue2192-environment-variables", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/issue2192-environment-variables/dub.sdl b/test/new_tests/issue2192-environment-variables/sample/dub.sdl similarity index 100% rename from test/issue2192-environment-variables/dub.sdl rename to test/new_tests/issue2192-environment-variables/sample/dub.sdl diff --git a/test/issue2192-environment-variables/source/lib.d b/test/new_tests/issue2192-environment-variables/sample/source/lib.d similarity index 100% rename from test/issue2192-environment-variables/source/lib.d rename to test/new_tests/issue2192-environment-variables/sample/source/lib.d diff --git a/test/new_tests/issue2192-environment-variables/source/app.d b/test/new_tests/issue2192-environment-variables/source/app.d new file mode 100644 index 0000000000..623ca7994a --- /dev/null +++ b/test/new_tests/issue2192-environment-variables/source/app.d @@ -0,0 +1,26 @@ +import common; + +import std.algorithm; +import std.file; +import std.path; +import std.process; +import std.string; + +void main () { + environment.remove("DUB_PACKAGE"); + immutable expectedPath = "sample/package.txt"; + if (exists(expectedPath)) remove(expectedPath); + + if (spawnProcess([dub, "build", "--force", "--root=sample", "--skip-registry=all"]).wait != 0) + die("Failed to build package with built-in environment variables."); + + if (!exists(expectedPath)) + die("Expected generated package.txt file is missing."); + if (readText(expectedPath).length == 0) + die("Expected generated package.txt file is empty."); + + auto p = teeProcess([dub, "describe", "--root=sample", "--skip-registry=all", "--data=pre-build-commands", "--data-list"]); + p.wait; + if (p.stdout.chomp != `echo 'issue2192-environment-variables' > package.txt`) + die("describe did not contain subtituted values or the correct package name"); +} From 326d8c0cdcb4457703438481219d4815109dad71 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Mon, 21 Jul 2025 22:48:48 +0300 Subject: [PATCH 116/187] issue2234-copy-read-only-files Don't check that applying the readonly attribute on a file prevents us from opening it for writing because the check can fail when run as root. Signed-off-by: Andrei Horodniceanu --- test/issue2234-copy-read-only-files.script.d | 128 ------------------ .../issue2234-copy-read-only-files/.gitignore | 1 - .../issue2234-copy-read-only-files/.gitignore | 7 + .../issue2234-copy-read-only-files/dub.json | 8 ++ .../sample}/dub.json | 0 .../sample}/files/images/to_be_deployed.img | 0 .../sample}/files/to_be_deployed.bin | 0 .../sample}/source/app.d | 0 .../source/app.d | 98 ++++++++++++++ 9 files changed, 113 insertions(+), 129 deletions(-) delete mode 100644 test/issue2234-copy-read-only-files.script.d delete mode 100644 test/issue2234-copy-read-only-files/.gitignore create mode 100644 test/new_tests/issue2234-copy-read-only-files/.gitignore create mode 100644 test/new_tests/issue2234-copy-read-only-files/dub.json rename test/{issue2234-copy-read-only-files => new_tests/issue2234-copy-read-only-files/sample}/dub.json (100%) rename test/{issue2234-copy-read-only-files => new_tests/issue2234-copy-read-only-files/sample}/files/images/to_be_deployed.img (100%) rename test/{issue2234-copy-read-only-files => new_tests/issue2234-copy-read-only-files/sample}/files/to_be_deployed.bin (100%) rename test/{issue2234-copy-read-only-files => new_tests/issue2234-copy-read-only-files/sample}/source/app.d (100%) create mode 100644 test/new_tests/issue2234-copy-read-only-files/source/app.d diff --git a/test/issue2234-copy-read-only-files.script.d b/test/issue2234-copy-read-only-files.script.d deleted file mode 100644 index 9383e9020f..0000000000 --- a/test/issue2234-copy-read-only-files.script.d +++ /dev/null @@ -1,128 +0,0 @@ -/+ dub.json: { -"name": "issue2234_copy_read_only_files" -} +/ - -/* -When DUB copies read-only files to the targetPath, the read-only flag must be -removed. If not, any subsequent copy operations will fail. - -Version control systems such as Git Large File Storage typically mark binary -files as read-only, to prevent simultaneous edits in unmergeable formats. -*/ - -module issue2234_copy_read_only_files.script; - -import - std.algorithm.searching, - std.algorithm.iteration, - std.stdio, std.process, std.path, std.file; - -int main() -{ - const project_dir = buildPath(__FILE_FULL_PATH__.dirName, "issue2234-copy-read-only-files"); - const deployment_dir = buildPath(project_dir, "bin"); - auto deployables = dirEntries(buildPath(project_dir, "files"), "*", SpanMode.depth).filter!isFile; - - // Prepare environment. - if (deployment_dir.exists) - { - foreach (entry; dirEntries(deployment_dir, "*", SpanMode.depth)) - { - if (entry.isDir) - entry.rmdir; - else - { - entry.makeWritable; - entry.remove; - } - } - deployment_dir.rmdir; - } - foreach (ref f; deployables) - f.makeReadOnly; - - // Execute test. - const dub = environment.get("DUB", buildPath(__FILE_FULL_PATH__.dirName.dirName, "bin", "dub.exe")); - const cmd = [dub, "build", "--build=release"]; - const result = execute(cmd, null, Config.none, size_t.max, project_dir); - if (result.status || result.output.canFind("Failed")) - { - writefln("\n> %-(%s %)", cmd); - writeln("==========================================================="); - writeln(result.output); - writeln("==========================================================="); - writeln("Last command failed with exit code ", result.status, '\n'); - return 1; - } - - foreach (deployed; dirEntries(deployment_dir, "*", SpanMode.depth).filter!isFile) - if (!isWritable(deployed)) - { - writeln(deployed, " is expected to be writable, but it is not."); - return 1; - } - - return 0; -} - -void makeReadOnly(string name) -{ - version (Windows) - { - import core.sys.windows.windows; - - name.setAttributes(name.getAttributes() | FILE_ATTRIBUTE_READONLY); - } - else version (Posix) - { - import core.sys.posix.sys.stat; - - name.setAttributes(name.getAttributes() & ~(S_IWUSR | S_IWGRP | S_IWOTH)); - } - else - static assert("Needs implementation."); - - import std.exception; - import std.stdio; - assertThrown!ErrnoException(File(name, "w")); -} - -void makeWritable(string name) -{ - version (Windows) - { - import core.sys.windows.windows; - - name.setAttributes(name.getAttributes() & ~FILE_ATTRIBUTE_READONLY); - } - else version (Posix) - { - import core.sys.posix.sys.stat; - - name.setAttributes(name.getAttributes() | S_IWUSR); - } - else - static assert("Needs implementation."); - - import std.exception; - import std.stdio; - assertNotThrown!ErrnoException(File(name, "w")); -} - -bool isWritable(string name) -{ - version (Windows) - { - import core.sys.windows.windows; - - return (name.getAttributes() & FILE_ATTRIBUTE_READONLY) == 0; - } - else version (Posix) - { - import core.sys.posix.sys.stat; - - return (name.getAttributes() & S_IWUSR) != 0; - } - else - static assert("Needs implementation."); -} diff --git a/test/issue2234-copy-read-only-files/.gitignore b/test/issue2234-copy-read-only-files/.gitignore deleted file mode 100644 index ba077a4031..0000000000 --- a/test/issue2234-copy-read-only-files/.gitignore +++ /dev/null @@ -1 +0,0 @@ -bin diff --git a/test/new_tests/issue2234-copy-read-only-files/.gitignore b/test/new_tests/issue2234-copy-read-only-files/.gitignore new file mode 100644 index 0000000000..7b5e5bd459 --- /dev/null +++ b/test/new_tests/issue2234-copy-read-only-files/.gitignore @@ -0,0 +1,7 @@ +/sample/** +!/sample/ +!/sample/dub.json +!/sample/files/ +!/sample/files/** +!/sample/source +!/sample/source/* diff --git a/test/new_tests/issue2234-copy-read-only-files/dub.json b/test/new_tests/issue2234-copy-read-only-files/dub.json new file mode 100644 index 0000000000..3f19f7b615 --- /dev/null +++ b/test/new_tests/issue2234-copy-read-only-files/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue2234-copy-read-only-files", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/issue2234-copy-read-only-files/dub.json b/test/new_tests/issue2234-copy-read-only-files/sample/dub.json similarity index 100% rename from test/issue2234-copy-read-only-files/dub.json rename to test/new_tests/issue2234-copy-read-only-files/sample/dub.json diff --git a/test/issue2234-copy-read-only-files/files/images/to_be_deployed.img b/test/new_tests/issue2234-copy-read-only-files/sample/files/images/to_be_deployed.img similarity index 100% rename from test/issue2234-copy-read-only-files/files/images/to_be_deployed.img rename to test/new_tests/issue2234-copy-read-only-files/sample/files/images/to_be_deployed.img diff --git a/test/issue2234-copy-read-only-files/files/to_be_deployed.bin b/test/new_tests/issue2234-copy-read-only-files/sample/files/to_be_deployed.bin similarity index 100% rename from test/issue2234-copy-read-only-files/files/to_be_deployed.bin rename to test/new_tests/issue2234-copy-read-only-files/sample/files/to_be_deployed.bin diff --git a/test/issue2234-copy-read-only-files/source/app.d b/test/new_tests/issue2234-copy-read-only-files/sample/source/app.d similarity index 100% rename from test/issue2234-copy-read-only-files/source/app.d rename to test/new_tests/issue2234-copy-read-only-files/sample/source/app.d diff --git a/test/new_tests/issue2234-copy-read-only-files/source/app.d b/test/new_tests/issue2234-copy-read-only-files/source/app.d new file mode 100644 index 0000000000..2a981b36dd --- /dev/null +++ b/test/new_tests/issue2234-copy-read-only-files/source/app.d @@ -0,0 +1,98 @@ +import common; + +import std.algorithm; +import std.file; +import std.path; +import std.process; + +void main () { + immutable deploymentDir = "sample/bin"; + auto deployables = dirEntries("sample/files", SpanMode.depth).filter!isFile; + + if (deploymentDir.exists) { + foreach (entry; dirEntries(deploymentDir, SpanMode.depth)) + if (entry.isDir) + entry.rmdir; + else { + entry.makeWritable; + entry.remove; + } + deploymentDir.rmdirRecurse; + } + + foreach (ref f; deployables) + f.makeReadOnly; + + if (spawnProcess([dub, "build", "--build=release"], null, Config.none, "sample").wait != 0) + die("Dub build failed"); + + foreach (deployed; dirEntries(deploymentDir, SpanMode.depth).filter!isFile) + if (!isWritable(deployed)) + die(deployed, " is expected to be writable, but it is not."); +} + +void makeReadOnly(string name) +{ + version (Windows) + { + import core.sys.windows.windows; + + name.setAttributes(name.getAttributes() | FILE_ATTRIBUTE_READONLY); + } + else version (Posix) + { + import core.sys.posix.sys.stat; + + name.setAttributes(name.getAttributes() & ~(S_IWUSR | S_IWGRP | S_IWOTH)); + } + else + static assert(false, "Needs implementation."); + + // This fails on posix when run as root. Just assume that the + // functions above work. + version(none) { + import std.exception; + import std.stdio; + assertThrown!ErrnoException(File(name, "w")); + } +} + +void makeWritable(string name) +{ + version (Windows) + { + import core.sys.windows.windows; + + name.setAttributes(name.getAttributes() & ~FILE_ATTRIBUTE_READONLY); + } + else version (Posix) + { + import core.sys.posix.sys.stat; + + name.setAttributes(name.getAttributes() | S_IWUSR); + } + else + static assert(false, "Needs implementation."); + + import std.exception; + import std.stdio; + assertNotThrown!ErrnoException(File(name, "w")); +} + +bool isWritable(string name) +{ + version (Windows) + { + import core.sys.windows.windows; + + return (name.getAttributes() & FILE_ATTRIBUTE_READONLY) == 0; + } + else version (Posix) + { + import core.sys.posix.sys.stat; + + return (name.getAttributes() & S_IWUSR) != 0; + } + else + static assert(false, "Needs implementation."); +} From a530043a14623bdc5b20c87af00a40a73b32ea9d Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Mon, 21 Jul 2025 22:51:10 +0300 Subject: [PATCH 117/187] issue2258-dynLib-exe-dep Signed-off-by: Andrei Horodniceanu --- test/issue2258-dynLib-exe-dep/.no_build_dmd | 0 test/issue2258-dynLib-exe-dep/.no_build_gdc | 0 test/{ => new_tests}/issue2258-dynLib-exe-dep/dub.json | 2 +- test/{ => new_tests}/issue2258-dynLib-exe-dep/source/app.d | 0 test/new_tests/issue2258-dynLib-exe-dep/test.config | 2 ++ 5 files changed, 3 insertions(+), 1 deletion(-) delete mode 100644 test/issue2258-dynLib-exe-dep/.no_build_dmd delete mode 100644 test/issue2258-dynLib-exe-dep/.no_build_gdc rename test/{ => new_tests}/issue2258-dynLib-exe-dep/dub.json (86%) rename test/{ => new_tests}/issue2258-dynLib-exe-dep/source/app.d (100%) create mode 100644 test/new_tests/issue2258-dynLib-exe-dep/test.config diff --git a/test/issue2258-dynLib-exe-dep/.no_build_dmd b/test/issue2258-dynLib-exe-dep/.no_build_dmd deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/issue2258-dynLib-exe-dep/.no_build_gdc b/test/issue2258-dynLib-exe-dep/.no_build_gdc deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/issue2258-dynLib-exe-dep/dub.json b/test/new_tests/issue2258-dynLib-exe-dep/dub.json similarity index 86% rename from test/issue2258-dynLib-exe-dep/dub.json rename to test/new_tests/issue2258-dynLib-exe-dep/dub.json index 30a9f4b5cb..ccb2e071c2 100644 --- a/test/issue2258-dynLib-exe-dep/dub.json +++ b/test/new_tests/issue2258-dynLib-exe-dep/dub.json @@ -1,5 +1,5 @@ { - "name": "dynlib-exe-dep", + "name": "issue2258-dynlib-exe-dep", "targetType": "executable", "dependencies": { "dynlib-simple": { "path": "../1-dynLib-simple/" } diff --git a/test/issue2258-dynLib-exe-dep/source/app.d b/test/new_tests/issue2258-dynLib-exe-dep/source/app.d similarity index 100% rename from test/issue2258-dynLib-exe-dep/source/app.d rename to test/new_tests/issue2258-dynLib-exe-dep/source/app.d diff --git a/test/new_tests/issue2258-dynLib-exe-dep/test.config b/test/new_tests/issue2258-dynLib-exe-dep/test.config new file mode 100644 index 0000000000..062eb71078 --- /dev/null +++ b/test/new_tests/issue2258-dynLib-exe-dep/test.config @@ -0,0 +1,2 @@ +dc_backend = ldc +locks = 1-dynLib-simple \ No newline at end of file From 42babaaa43a2624923c6ada766a3f9a6fb090399 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Tue, 22 Jul 2025 07:10:19 +0300 Subject: [PATCH 118/187] issue2262-exact-cached-version-match Signed-off-by: Andrei Horodniceanu --- test/issue2262-exact-cached-version-match.sh | 49 ----------------- .../.no_build | 0 .../.gitignore | 5 ++ .../dub.json | 8 +++ .../sample}/dub.sdl | 0 .../sample}/source/app.d | 0 .../source/app.d | 54 +++++++++++++++++++ 7 files changed, 67 insertions(+), 49 deletions(-) delete mode 100755 test/issue2262-exact-cached-version-match.sh delete mode 100644 test/issue2262-exact-cached-version-match/.no_build create mode 100644 test/new_tests/issue2262-exact-cached-version-match/.gitignore create mode 100644 test/new_tests/issue2262-exact-cached-version-match/dub.json rename test/{issue2262-exact-cached-version-match => new_tests/issue2262-exact-cached-version-match/sample}/dub.sdl (100%) rename test/{issue2262-exact-cached-version-match => new_tests/issue2262-exact-cached-version-match/sample}/source/app.d (100%) create mode 100644 test/new_tests/issue2262-exact-cached-version-match/source/app.d diff --git a/test/issue2262-exact-cached-version-match.sh b/test/issue2262-exact-cached-version-match.sh deleted file mode 100755 index faa5e5b764..0000000000 --- a/test/issue2262-exact-cached-version-match.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/env bash - -. $(dirname ${BASH_SOURCE[0]})/common.sh - -PACK_PATH="$CURR_DIR"/issue2262-exact-cached-version-match - -# make sure that there are no left-over selections files -rm -f $PACK_PATH/dub.selections.json - -# make sure that there are no cached versions of the dependency -dub remove gitcompatibledubpackage@* -n || true - -# build normally, should select 1.0.4 -if ! ${DUB} build --root $PACK_PATH | grep "gitcompatibledubpackage 1\.0\.4:"; then - die $LINENO 'The initial build failed.' -fi -dub remove gitcompatibledubpackage@* -n || true - -# build with git dependency to a specific commit -cat > $PACK_PATH/dub.selections.json << EOF -{ - "fileVersion": 1, - "versions": { - "gitcompatibledubpackage": { - "repository": "git+https://github.com/dlang-community/gitcompatibledubpackage.git", - "version": "ccb31bf6a655437176ec02e04c2305a8c7c90d67" - } - } -} -EOF -if ! ${DUB} build --root $PACK_PATH | grep "gitcompatibledubpackage 1\.0\.4+commit\.2\.gccb31bf:"; then - die $LINENO 'The build with a specific commit failed.' -fi - -# select 1.0.4 again -cat > $PACK_PATH/dub.selections.json << EOF -{ - "fileVersion": 1, - "versions": { - "gitcompatibledubpackage": "1.0.4" - } -} -EOF -if ! ${DUB} build --root $PACK_PATH | grep "gitcompatibledubpackage 1\.0\.4:"; then - die $LINENO 'The second 1.0.4 build failed.' -fi - -# clean up -rm -f $PACK_PATH/dub.selections.json diff --git a/test/issue2262-exact-cached-version-match/.no_build b/test/issue2262-exact-cached-version-match/.no_build deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/new_tests/issue2262-exact-cached-version-match/.gitignore b/test/new_tests/issue2262-exact-cached-version-match/.gitignore new file mode 100644 index 0000000000..983d10db3b --- /dev/null +++ b/test/new_tests/issue2262-exact-cached-version-match/.gitignore @@ -0,0 +1,5 @@ +/sample/** +!/sample +!/sample/dub.sdl +!/sample/source/ +!/sample/source/**.d \ No newline at end of file diff --git a/test/new_tests/issue2262-exact-cached-version-match/dub.json b/test/new_tests/issue2262-exact-cached-version-match/dub.json new file mode 100644 index 0000000000..c9efe6912d --- /dev/null +++ b/test/new_tests/issue2262-exact-cached-version-match/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue2262-exact-cached-version-match", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/issue2262-exact-cached-version-match/dub.sdl b/test/new_tests/issue2262-exact-cached-version-match/sample/dub.sdl similarity index 100% rename from test/issue2262-exact-cached-version-match/dub.sdl rename to test/new_tests/issue2262-exact-cached-version-match/sample/dub.sdl diff --git a/test/issue2262-exact-cached-version-match/source/app.d b/test/new_tests/issue2262-exact-cached-version-match/sample/source/app.d similarity index 100% rename from test/issue2262-exact-cached-version-match/source/app.d rename to test/new_tests/issue2262-exact-cached-version-match/sample/source/app.d diff --git a/test/new_tests/issue2262-exact-cached-version-match/source/app.d b/test/new_tests/issue2262-exact-cached-version-match/source/app.d new file mode 100644 index 0000000000..92a5d00796 --- /dev/null +++ b/test/new_tests/issue2262-exact-cached-version-match/source/app.d @@ -0,0 +1,54 @@ +import common; + +import std.algorithm; +import std.file; +import std.path; +import std.process; + +void main () { + chdir("sample"); + + // make sure that there are no left-over selections files + if (exists("dub.selections.json")) remove("dub.selections.json"); + + // make sure that there are no cached versions of the dependency + // dub remove fails to remove the git package on windows + if (exists(dubHome)) rmdirRecurse(dubHome); + + // build normally, should select 1.0.4 + auto p = teeProcess([dub, "build"]); + if (p.wait != 0 || !p.stdout.canFind(`gitcompatibledubpackage 1.0.4:`)) + die("The initial build failed."); + + spawnProcess([dub, "remove", "gitcompatibledubpackage@*", "-n"]).wait; + + // build with git dependency to a specific commit + write("dub.selections.json", ` +{ + "fileVersion": 1, + "versions": { + "gitcompatibledubpackage": { + "repository": "git+https://github.com/dlang-community/gitcompatibledubpackage.git", + "version": "ccb31bf6a655437176ec02e04c2305a8c7c90d67" + } + } +} +`); + p = teeProcess([dub, "build"]); + if (p.wait != 0 || !p.stdout.canFind(`gitcompatibledubpackage 1.0.4+commit.2.gccb31bf:`)) { + die("The build with a specific commit failed."); + } + + // select 1.0.4 again + write("dub.selections.json", ` +{ + "fileVersion": 1, + "versions": { + "gitcompatibledubpackage": "1.0.4" + } +} +`); + p = teeProcess([dub, "build"]); + if (p.wait != 0 || !p.stdout.canFind(`gitcompatibledubpackage 1.0.4:`)) + die("The second 1.0.4 build failed."); +} From f39966f6a819da0c7ed15957ae85524950e6e4c1 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Tue, 22 Jul 2025 07:19:44 +0300 Subject: [PATCH 119/187] issue2348-postbuildcommands Signed-off-by: Andrei Horodniceanu --- test/issue2348-postbuildcommands.script.d | 30 ------------------- .../issue2348-postbuildcommands/.gitignore | 1 + .../issue2348-postbuildcommands/dub.json | 8 +++++ .../issue2348-postbuildcommands/single.d | 7 +++++ .../issue2348-postbuildcommands/source/app.d | 8 +++++ 5 files changed, 24 insertions(+), 30 deletions(-) delete mode 100644 test/issue2348-postbuildcommands.script.d create mode 100644 test/new_tests/issue2348-postbuildcommands/.gitignore create mode 100644 test/new_tests/issue2348-postbuildcommands/dub.json create mode 100644 test/new_tests/issue2348-postbuildcommands/single.d create mode 100644 test/new_tests/issue2348-postbuildcommands/source/app.d diff --git a/test/issue2348-postbuildcommands.script.d b/test/issue2348-postbuildcommands.script.d deleted file mode 100644 index a65a280f1e..0000000000 --- a/test/issue2348-postbuildcommands.script.d +++ /dev/null @@ -1,30 +0,0 @@ -/+ dub.sdl: -name "issue2348" -buildType "test" { - buildOptions "syntaxOnly" - postBuildCommands "echo xxx" -} -+/ -module issue2348; - -import std.process; -import std.stdio; -import std.algorithm; -import std.path; - -int main() -{ - const dub = environment.get("DUB", buildPath(__FILE_FULL_PATH__.dirName.dirName, "bin", "dub.exe")); - const cmd = [dub, "build", "--build=test", "--single", __FILE_FULL_PATH__]; - const result = execute(cmd, null, Config.none, size_t.max, __FILE_FULL_PATH__.dirName); - if (result.status || result.output.canFind("Failed")) - { - writefln("\n> %-(%s %)", cmd); - writeln("==========================================================="); - writeln(result.output); - writeln("==========================================================="); - writeln("Last command failed with exit code ", result.status, '\n'); - return 1; - } - return 0; -} diff --git a/test/new_tests/issue2348-postbuildcommands/.gitignore b/test/new_tests/issue2348-postbuildcommands/.gitignore new file mode 100644 index 0000000000..96ae139c5d --- /dev/null +++ b/test/new_tests/issue2348-postbuildcommands/.gitignore @@ -0,0 +1 @@ +!/single.d diff --git a/test/new_tests/issue2348-postbuildcommands/dub.json b/test/new_tests/issue2348-postbuildcommands/dub.json new file mode 100644 index 0000000000..d14f11e433 --- /dev/null +++ b/test/new_tests/issue2348-postbuildcommands/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue2348-postbuildcommands", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/new_tests/issue2348-postbuildcommands/single.d b/test/new_tests/issue2348-postbuildcommands/single.d new file mode 100644 index 0000000000..c3292c9245 --- /dev/null +++ b/test/new_tests/issue2348-postbuildcommands/single.d @@ -0,0 +1,7 @@ +/+ dub.sdl: +name "issue2348-single" +buildType "test" { + buildOptions "syntaxOnly" + postBuildCommands "echo xxx" +} ++/ diff --git a/test/new_tests/issue2348-postbuildcommands/source/app.d b/test/new_tests/issue2348-postbuildcommands/source/app.d new file mode 100644 index 0000000000..6515d9086b --- /dev/null +++ b/test/new_tests/issue2348-postbuildcommands/source/app.d @@ -0,0 +1,8 @@ +import common; + +import std.process; + +void main () { + if (spawnProcess([dub, "build", "--build=test", "--single", "single.d"]).wait != 0) + die("Dub build failed"); +} From 4a5229f9c125ae2ceb9cf61a5d52f97b28e4523b Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Tue, 22 Jul 2025 07:42:40 +0300 Subject: [PATCH 120/187] issue2377-dynLib-dep-extra-files Signed-off-by: Andrei Horodniceanu --- .../issue2377-dynLib-dep-extra-files.script.d | 135 ------------------ .../.gitignore | 1 - .../.no_build | 0 .../.gitignore | 9 ++ .../issue2377-dynLib-dep-extra-files/dub.json | 8 ++ .../sample}/dep1/dub.sdl | 0 .../sample}/dep1/source/dep1.d | 0 .../sample}/dep2/dub.sdl | 0 .../sample}/dep2/source/dep2.d | 0 .../sample}/framework/dub.sdl | 0 .../sample}/parent/dub.sdl | 0 .../sample}/parent/source/app.d | 0 .../sample}/parent/source/parent.d | 0 .../source/app.d | 129 +++++++++++++++++ 14 files changed, 146 insertions(+), 136 deletions(-) delete mode 100644 test/issue2377-dynLib-dep-extra-files.script.d delete mode 100644 test/issue2377-dynLib-dep-extra-files/.gitignore delete mode 100644 test/issue2377-dynLib-dep-extra-files/.no_build create mode 100644 test/new_tests/issue2377-dynLib-dep-extra-files/.gitignore create mode 100644 test/new_tests/issue2377-dynLib-dep-extra-files/dub.json rename test/{issue2377-dynLib-dep-extra-files => new_tests/issue2377-dynLib-dep-extra-files/sample}/dep1/dub.sdl (100%) rename test/{issue2377-dynLib-dep-extra-files => new_tests/issue2377-dynLib-dep-extra-files/sample}/dep1/source/dep1.d (100%) rename test/{issue2377-dynLib-dep-extra-files => new_tests/issue2377-dynLib-dep-extra-files/sample}/dep2/dub.sdl (100%) rename test/{issue2377-dynLib-dep-extra-files => new_tests/issue2377-dynLib-dep-extra-files/sample}/dep2/source/dep2.d (100%) rename test/{issue2377-dynLib-dep-extra-files => new_tests/issue2377-dynLib-dep-extra-files/sample}/framework/dub.sdl (100%) rename test/{issue2377-dynLib-dep-extra-files => new_tests/issue2377-dynLib-dep-extra-files/sample}/parent/dub.sdl (100%) rename test/{issue2377-dynLib-dep-extra-files => new_tests/issue2377-dynLib-dep-extra-files/sample}/parent/source/app.d (100%) rename test/{issue2377-dynLib-dep-extra-files => new_tests/issue2377-dynLib-dep-extra-files/sample}/parent/source/parent.d (100%) create mode 100644 test/new_tests/issue2377-dynLib-dep-extra-files/source/app.d diff --git a/test/issue2377-dynLib-dep-extra-files.script.d b/test/issue2377-dynLib-dep-extra-files.script.d deleted file mode 100644 index 4eb90ec4bd..0000000000 --- a/test/issue2377-dynLib-dep-extra-files.script.d +++ /dev/null @@ -1,135 +0,0 @@ -/+ dub.sdl: -name "issue2377_dynlib_dep_extra_files" -+/ - -module issue2377_dynlib_dep_extra_files.script; - -import std.exception : enforce; -import std.file; -import std.path; - -version (DigitalMars) version (Windows) version = DMD_Windows; -version (DMD_Windows) { - void main() { - import std.stdio; - writeln("WARNING: skipping test '" ~ __FILE_FULL_PATH__.baseName ~ "' with DMD on Windows."); - } -} else: - -void main() { - import std.process : environment; - - version (Windows) enum exeExt = ".exe"; - else enum exeExt = ""; - const dub = environment.get("DUB", buildPath(__FILE_FULL_PATH__.dirName.dirName, "bin", "dub"~exeExt)); - - enum testDir = buildPath(__FILE_FULL_PATH__.dirName, "issue2377-dynLib-dep-extra-files"); - - // 1. `parent` as root package (depending on dynamic/static dep1, which depends on dynamic/static dep2) - chdir(buildPath(testDir, "parent")); - if (exists("output")) - rmdirRecurse("output"); - - // 1.1 dynlib config - run(dub ~ " build -c dynlib"); - chdir("output/dynlib"); - assertDynLibExists("parent"); - assertDynLibExists("dep1"); - assertDynLibExists("dep2"); - version (Windows) { - assertFileExists("parent.pdb"); - assertFileExists("parent.lib"); - assertFileExists("parent.exp"); - assertFileExists("dep1.pdb"); - assertFileExists("dep1.lib"); - assertFileExists("dep1.exp"); - assertFileExists("dep2.pdb"); - assertFileExists("dep2.lib"); - assertFileExists("dep2.exp"); - } - chdir("../.."); - - // 1.2 dynlib_static config - run(dub ~ " build -c dynlib_static"); - chdir("output/dynlib_static"); - assertDynLibExists("parent"); - version (Windows) { - assertFileExists("parent.pdb"); - assertFileExists("parent.lib"); - assertFileExists("parent.exp"); - } - enforce(!canFindFiles("*dep*"), "unexpected dependency files in statically linked dynlib output dir"); - chdir("../.."); - - // 1.3 exe_static config - run(dub ~ " build -c exe_static"); - chdir("output/exe_static"); - version (Windows) run(`.\parent.exe`); - else run("./parent"); - version (Windows) { - assertFileExists("parent.pdb"); - enforce(!exists("parent.lib"), "unexpected import .lib for executable"); - enforce(!exists("parent.exp"), "unexpected .exp file for executable"); - } - enforce(!canFindFiles("*dep*"), "unexpected dependency files in statically linked executable output dir"); - chdir("../.."); - - // 1.4 exe_dynamic config - run(dub ~ " build -c exe_dynamic"); - chdir("output/exe_dynamic"); - version (Windows) run(`.\parent.exe`); - else run(`LD_LIBRARY_PATH=".:${LD_LIBRARY_PATH:-}" ./parent`); - assertDynLibExists("dep1"); - assertDynLibExists("dep2"); - version (Windows) { - assertFileExists("dep1.pdb"); - assertFileExists("dep2.pdb"); - enforce(!canFindFiles("*.lib"), "unexpected import libs in dynamically linked executable output dir"); - enforce(!canFindFiles("*.exp"), "unexpected .exp files in dynamically linked executable output dir"); - } - chdir("../.."); - - // 2. `framework` as root package (targetType `none`) - chdir(buildPath(testDir, "framework")); - run(dub ~ " build"); - assertDynLibExists("dep1"); - assertDynLibExists("dep2"); - version (Windows) { - assertFileExists("dep1.pdb"); - assertFileExists("dep1.lib"); - assertFileExists("dep1.exp"); - assertFileExists("dep2.pdb"); - assertFileExists("dep2.lib"); - assertFileExists("dep2.exp"); - } -} - -void run(string command) { - import std.process; - const status = spawnShell(command).wait(); - enforce(status == 0, "command '" ~ command ~ "' failed"); -} - -void assertFileExists(string path) { - enforce(exists(path), "expected file '" ~ path ~ "' not found"); -} - -void assertDynLibExists(string name) { - version (Windows) { - enum prefix = ""; - enum suffix = ".dll"; - } else version (OSX) { - enum prefix = "lib"; - enum suffix = ".dylib"; - } else { - enum prefix = "lib"; - enum suffix = ".so"; - } - - assertFileExists(prefix ~ name ~ suffix); -} - -bool canFindFiles(string pattern) { - auto entries = dirEntries(".", pattern, SpanMode.shallow); - return !entries.empty(); -} diff --git a/test/issue2377-dynLib-dep-extra-files/.gitignore b/test/issue2377-dynLib-dep-extra-files/.gitignore deleted file mode 100644 index 5d658ecbfb..0000000000 --- a/test/issue2377-dynLib-dep-extra-files/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/parent/output/ diff --git a/test/issue2377-dynLib-dep-extra-files/.no_build b/test/issue2377-dynLib-dep-extra-files/.no_build deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/new_tests/issue2377-dynLib-dep-extra-files/.gitignore b/test/new_tests/issue2377-dynLib-dep-extra-files/.gitignore new file mode 100644 index 0000000000..9779939c7e --- /dev/null +++ b/test/new_tests/issue2377-dynLib-dep-extra-files/.gitignore @@ -0,0 +1,9 @@ +/sample/** +!/sample/ +!/sample/parent/ +!/sample/dep1/ +!/sample/dep2/ +!/sample/framework/ +!/sample/*/dub.sdl +!/sample/*/source/ +!/sample/*/source/*.d \ No newline at end of file diff --git a/test/new_tests/issue2377-dynLib-dep-extra-files/dub.json b/test/new_tests/issue2377-dynLib-dep-extra-files/dub.json new file mode 100644 index 0000000000..42f1d99985 --- /dev/null +++ b/test/new_tests/issue2377-dynLib-dep-extra-files/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue2377-dynLib-dep-extra-files", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/issue2377-dynLib-dep-extra-files/dep1/dub.sdl b/test/new_tests/issue2377-dynLib-dep-extra-files/sample/dep1/dub.sdl similarity index 100% rename from test/issue2377-dynLib-dep-extra-files/dep1/dub.sdl rename to test/new_tests/issue2377-dynLib-dep-extra-files/sample/dep1/dub.sdl diff --git a/test/issue2377-dynLib-dep-extra-files/dep1/source/dep1.d b/test/new_tests/issue2377-dynLib-dep-extra-files/sample/dep1/source/dep1.d similarity index 100% rename from test/issue2377-dynLib-dep-extra-files/dep1/source/dep1.d rename to test/new_tests/issue2377-dynLib-dep-extra-files/sample/dep1/source/dep1.d diff --git a/test/issue2377-dynLib-dep-extra-files/dep2/dub.sdl b/test/new_tests/issue2377-dynLib-dep-extra-files/sample/dep2/dub.sdl similarity index 100% rename from test/issue2377-dynLib-dep-extra-files/dep2/dub.sdl rename to test/new_tests/issue2377-dynLib-dep-extra-files/sample/dep2/dub.sdl diff --git a/test/issue2377-dynLib-dep-extra-files/dep2/source/dep2.d b/test/new_tests/issue2377-dynLib-dep-extra-files/sample/dep2/source/dep2.d similarity index 100% rename from test/issue2377-dynLib-dep-extra-files/dep2/source/dep2.d rename to test/new_tests/issue2377-dynLib-dep-extra-files/sample/dep2/source/dep2.d diff --git a/test/issue2377-dynLib-dep-extra-files/framework/dub.sdl b/test/new_tests/issue2377-dynLib-dep-extra-files/sample/framework/dub.sdl similarity index 100% rename from test/issue2377-dynLib-dep-extra-files/framework/dub.sdl rename to test/new_tests/issue2377-dynLib-dep-extra-files/sample/framework/dub.sdl diff --git a/test/issue2377-dynLib-dep-extra-files/parent/dub.sdl b/test/new_tests/issue2377-dynLib-dep-extra-files/sample/parent/dub.sdl similarity index 100% rename from test/issue2377-dynLib-dep-extra-files/parent/dub.sdl rename to test/new_tests/issue2377-dynLib-dep-extra-files/sample/parent/dub.sdl diff --git a/test/issue2377-dynLib-dep-extra-files/parent/source/app.d b/test/new_tests/issue2377-dynLib-dep-extra-files/sample/parent/source/app.d similarity index 100% rename from test/issue2377-dynLib-dep-extra-files/parent/source/app.d rename to test/new_tests/issue2377-dynLib-dep-extra-files/sample/parent/source/app.d diff --git a/test/issue2377-dynLib-dep-extra-files/parent/source/parent.d b/test/new_tests/issue2377-dynLib-dep-extra-files/sample/parent/source/parent.d similarity index 100% rename from test/issue2377-dynLib-dep-extra-files/parent/source/parent.d rename to test/new_tests/issue2377-dynLib-dep-extra-files/sample/parent/source/parent.d diff --git a/test/new_tests/issue2377-dynLib-dep-extra-files/source/app.d b/test/new_tests/issue2377-dynLib-dep-extra-files/source/app.d new file mode 100644 index 0000000000..66c39b9f34 --- /dev/null +++ b/test/new_tests/issue2377-dynLib-dep-extra-files/source/app.d @@ -0,0 +1,129 @@ +import common; + +import std.algorithm; +import std.file; +import std.path; +import std.process; + +void main () { + version (DigitalMars) version (Windows) + skip("dmd on windows"); + + chdir("sample/parent"); + if (exists("output")) + rmdirRecurse("output"); + + + // 1.1 dynlib config + if (spawnProcess([dub, "build", "-c", "dynlib"]).wait != 0) + die("`dub build -c dynlib` failed"); + chdir("output/dynlib"); + assertDynLibExists("parent"); + assertDynLibExists("dep1"); + assertDynLibExists("dep2"); + version (Windows) { + assertFileExists("parent.pdb"); + assertFileExists("parent.lib"); + assertFileExists("parent.exp"); + assertFileExists("dep1.pdb"); + assertFileExists("dep1.lib"); + assertFileExists("dep1.exp"); + assertFileExists("dep2.pdb"); + assertFileExists("dep2.lib"); + assertFileExists("dep2.exp"); + } + chdir("../.."); + + // 1.2 dynlib_static config + if (spawnProcess([dub, "build", "-c", "dynlib_static"]).wait != 0) + die("`dub build -c dynlib_static` failed"); + chdir("output/dynlib_static"); + assertDynLibExists("parent"); + version (Windows) { + assertFileExists("parent.pdb"); + assertFileExists("parent.lib"); + assertFileExists("parent.exp"); + } + if (canFindFiles("*dep*")) + die("unexpected dependency files in statically linked dynlib output dir"); + chdir("../.."); + + // 1.3 exe_static config + if (spawnProcess([dub, "build", "-c", "exe_static"]).wait != 0) + die("`dub build -c exe_static` failed"); + chdir("output/exe_static"); + if (spawnProcess(["./parent"]).wait != 0) + die("Running the parent failed"); + version (Windows) { + assertFileExists("parent.pdb"); + if (exists("parent.lib")) + die("unexpected import .lib for executable"); + if (exists("parent.exp")) + die("unexpected .exp file for executable"); + } + if (canFindFiles("*dep*")) + die("unexpected dependency files in statically linked executable output dir"); + chdir("../.."); + + // 1.4 exe_dynamic config + if (spawnProcess([dub, "build", "-c", "exe_dynamic"]).wait != 0) + die("`dub build -c exe_dynamic` failed"); + chdir("output/exe_dynamic"); + + string[string] env; + version (Posix) env["LD_LIBRARY_PATH"] = ".:" ~ environment.get("LD_LIBRARY_PATH", ""); + if (spawnProcess(["./parent"], env).wait != 0) + die("Running the parent failed"); + assertDynLibExists("dep1"); + assertDynLibExists("dep2"); + version (Windows) { + assertFileExists("dep1.pdb"); + assertFileExists("dep2.pdb"); + if (canFindFiles("*.lib")) + die("unexpected import libs in dynamically linked executable output dir"); + if (canFindFiles("*.exp")) + die("unexpected import libs in dynamically linked executable output dir"); + } + chdir("../.."); + + // 2. `framework` as root package (targetType `none`) + chdir("../framework"); + if (spawnProcess([dub, "build"]).wait != 0) + die("`dub build` failed for framework"); + assertDynLibExists("dep1"); + assertDynLibExists("dep2"); + version (Windows) { + assertFileExists("dep1.pdb"); + assertFileExists("dep1.lib"); + assertFileExists("dep1.exp"); + assertFileExists("dep2.pdb"); + assertFileExists("dep2.lib"); + assertFileExists("dep2.exp"); + } +} + + +void assertFileExists(string path) { + if (!exists(path)) + die("Expected file '", path, "' not found"); +} + +void assertDynLibExists(string name) { + version (Windows) { + enum prefix = ""; + enum suffix = ".dll"; + } else version (OSX) { + enum prefix = "lib"; + enum suffix = ".dylib"; + } else { + enum prefix = "lib"; + enum suffix = ".so"; + } + + assertFileExists(prefix ~ name ~ suffix); +} + +bool canFindFiles(string pattern) { + auto entries = dirEntries(".", pattern, SpanMode.shallow); + return !entries.empty(); +} From e24b935a802e166bb8a009664bbc4e586132d1e7 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sun, 27 Jul 2025 18:05:08 +0300 Subject: [PATCH 121/187] issue2377-dynLib-dep-extra-files: don't check for *exp files on windows They aren't generated for me with ldc2 and ldmd2 gives build errors with dynamic libraries. Signed-off-by: Andrei Horodniceanu --- .../source/app.d | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/test/new_tests/issue2377-dynLib-dep-extra-files/source/app.d b/test/new_tests/issue2377-dynLib-dep-extra-files/source/app.d index 66c39b9f34..2090cf0f78 100644 --- a/test/new_tests/issue2377-dynLib-dep-extra-files/source/app.d +++ b/test/new_tests/issue2377-dynLib-dep-extra-files/source/app.d @@ -24,13 +24,13 @@ void main () { version (Windows) { assertFileExists("parent.pdb"); assertFileExists("parent.lib"); - assertFileExists("parent.exp"); + version(none) assertFileExists("parent.exp"); assertFileExists("dep1.pdb"); assertFileExists("dep1.lib"); - assertFileExists("dep1.exp"); + version(none) assertFileExists("dep1.exp"); assertFileExists("dep2.pdb"); assertFileExists("dep2.lib"); - assertFileExists("dep2.exp"); + version(none) assertFileExists("dep2.exp"); } chdir("../.."); @@ -42,7 +42,7 @@ void main () { version (Windows) { assertFileExists("parent.pdb"); assertFileExists("parent.lib"); - assertFileExists("parent.exp"); + version(none) assertFileExists("parent.exp"); } if (canFindFiles("*dep*")) die("unexpected dependency files in statically linked dynlib output dir"); @@ -58,7 +58,7 @@ void main () { assertFileExists("parent.pdb"); if (exists("parent.lib")) die("unexpected import .lib for executable"); - if (exists("parent.exp")) + version (none) if (exists("parent.exp")) die("unexpected .exp file for executable"); } if (canFindFiles("*dep*")) @@ -81,7 +81,7 @@ void main () { assertFileExists("dep2.pdb"); if (canFindFiles("*.lib")) die("unexpected import libs in dynamically linked executable output dir"); - if (canFindFiles("*.exp")) + version (none) if (canFindFiles("*.exp")) die("unexpected import libs in dynamically linked executable output dir"); } chdir("../.."); @@ -95,10 +95,10 @@ void main () { version (Windows) { assertFileExists("dep1.pdb"); assertFileExists("dep1.lib"); - assertFileExists("dep1.exp"); + version(none) assertFileExists("dep1.exp"); assertFileExists("dep2.pdb"); assertFileExists("dep2.lib"); - assertFileExists("dep2.exp"); + version(none) assertFileExists("dep2.exp"); } } From 0851fe62e39dee6eb6863207cd25579785a945e3 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Tue, 22 Jul 2025 07:53:43 +0300 Subject: [PATCH 122/187] issue2448 Signed-off-by: Andrei Horodniceanu --- test/new_tests/issue2448/.gitignore | 1 + test/{ => new_tests}/issue2448/dub.json | 2 +- test/{ => new_tests}/issue2448/ext/kekw.d | 0 test/{ => new_tests}/issue2448/source/app.d | 0 4 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 test/new_tests/issue2448/.gitignore rename test/{ => new_tests}/issue2448/dub.json (67%) rename test/{ => new_tests}/issue2448/ext/kekw.d (100%) rename test/{ => new_tests}/issue2448/source/app.d (100%) diff --git a/test/new_tests/issue2448/.gitignore b/test/new_tests/issue2448/.gitignore new file mode 100644 index 0000000000..67d836f5bb --- /dev/null +++ b/test/new_tests/issue2448/.gitignore @@ -0,0 +1 @@ +!/ext/ \ No newline at end of file diff --git a/test/issue2448/dub.json b/test/new_tests/issue2448/dub.json similarity index 67% rename from test/issue2448/dub.json rename to test/new_tests/issue2448/dub.json index 76c561cf2d..d98360313d 100644 --- a/test/issue2448/dub.json +++ b/test/new_tests/issue2448/dub.json @@ -1,5 +1,5 @@ { - "name": "use-source-files", + "name": "issue2448-use-source-files", "description": "Example of using source files.", "sourceFiles": ["ext/*.d"] } diff --git a/test/issue2448/ext/kekw.d b/test/new_tests/issue2448/ext/kekw.d similarity index 100% rename from test/issue2448/ext/kekw.d rename to test/new_tests/issue2448/ext/kekw.d diff --git a/test/issue2448/source/app.d b/test/new_tests/issue2448/source/app.d similarity index 100% rename from test/issue2448/source/app.d rename to test/new_tests/issue2448/source/app.d From 2a624a93e47aac98471c0024d050c3a89ad6963a Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Tue, 22 Jul 2025 07:55:33 +0300 Subject: [PATCH 123/187] issue2452 Signed-off-by: Andrei Horodniceanu --- test/issue2452/.no_test | 0 test/{ => new_tests}/issue2452/dub.json | 2 +- test/{ => new_tests}/issue2452/source/app.d | 0 3 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 test/issue2452/.no_test rename test/{ => new_tests}/issue2452/dub.json (84%) rename test/{ => new_tests}/issue2452/source/app.d (100%) diff --git a/test/issue2452/.no_test b/test/issue2452/.no_test deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/issue2452/dub.json b/test/new_tests/issue2452/dub.json similarity index 84% rename from test/issue2452/dub.json rename to test/new_tests/issue2452/dub.json index 1260386dc2..3816cdd773 100644 --- a/test/issue2452/dub.json +++ b/test/new_tests/issue2452/dub.json @@ -1,5 +1,5 @@ { - "name": "generated-sources-and-source-files-without-glob", + "name": "issue2452-generated-sources-and-source-files-without-glob", "description": "Example of using pre generate commands and sourceFiles without glob.", "sourceFiles": ["ext/fortytwo.d"], "preGenerateCommands-posix": [ diff --git a/test/issue2452/source/app.d b/test/new_tests/issue2452/source/app.d similarity index 100% rename from test/issue2452/source/app.d rename to test/new_tests/issue2452/source/app.d From 8bd5a7a8771fb9506fca879dac7c6f787f9b8fb5 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Tue, 22 Jul 2025 22:07:29 +0300 Subject: [PATCH 124/187] issue2574-mistyping-commands Signed-off-by: Andrei Horodniceanu --- test/issue2574-mistyping-commands.sh | 17 --------------- .../issue2574-mistyping-commands/dub.json | 8 +++++++ .../issue2574-mistyping-commands/source/app.d | 21 +++++++++++++++++++ 3 files changed, 29 insertions(+), 17 deletions(-) delete mode 100755 test/issue2574-mistyping-commands.sh create mode 100644 test/new_tests/issue2574-mistyping-commands/dub.json create mode 100644 test/new_tests/issue2574-mistyping-commands/source/app.d diff --git a/test/issue2574-mistyping-commands.sh b/test/issue2574-mistyping-commands.sh deleted file mode 100755 index b239a2a1fb..0000000000 --- a/test/issue2574-mistyping-commands.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env bash - -. $(dirname "${BASH_SOURCE[0]}")/common.sh - -$DUB upfrade 2>&1 >/dev/null && die $LINENO '"dub upfrade" should not succeed' - -if [ "$($DUB upfrade 2>&1 | grep -Fc "Unknown command: upfrade")" != "1" ]; then - die $LINENO 'Missing Unknown command line' -fi - -if [ "$($DUB upfrade 2>&1 | grep -Fc "Did you mean 'upgrade'?")" != "1" ]; then - die $LINENO 'Missing upgrade suggestion' -fi - -if [ "$($DUB upfrade 2>&1 | grep -Fc "build")" != "0" ]; then - die $LINENO 'Did not expect to see build as a suggestion and did not want a full list of commands' -fi diff --git a/test/new_tests/issue2574-mistyping-commands/dub.json b/test/new_tests/issue2574-mistyping-commands/dub.json new file mode 100644 index 0000000000..43de296b56 --- /dev/null +++ b/test/new_tests/issue2574-mistyping-commands/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue2574-mistyping-commands", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/new_tests/issue2574-mistyping-commands/source/app.d b/test/new_tests/issue2574-mistyping-commands/source/app.d new file mode 100644 index 0000000000..960d1fe33e --- /dev/null +++ b/test/new_tests/issue2574-mistyping-commands/source/app.d @@ -0,0 +1,21 @@ +import common; + +import std.algorithm; +import std.file; +import std.path; +import std.process; + +void main () { + auto p = teeProcess([dub, "upfrade"], Redirect.stdout | Redirect.stderrToStdout); + if (p.wait == 0) + die(`"dub upfrade" should not succeed`); + + if (!p.stdout.canFind("Unknown command: upfrade")) + die("Missing Unknown command line"); + + if (!p.stdout.canFind("Did you mean 'upgrade'?")) + die("Missing upgrade suggestion"); + + if (p.stdout.canFind("build")) + die("Did not expect to see build as a suggestion and did not want a full list of commands"); +} From c35ee5e5eb9a7f9123080746d4be5544effca55f Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Tue, 22 Jul 2025 22:14:10 +0300 Subject: [PATCH 125/187] issue2587-subpackage-dependency-resolution Signed-off-by: Andrei Horodniceanu --- ...ue2587-subpackage-dependency-resolution.sh | 13 ----------- .../.no_build | 0 .../.no_run | 0 .../.no_test | 0 .../a/.gitignore | 16 -------------- .../b/.gitignore | 16 -------------- .../c/.gitignore | 16 -------------- .../.gitignore | 8 +++++++ .../dub.json | 8 +++++++ .../sample}/a/dub.json | 0 .../sample}/a/source/app.d | 0 .../sample}/b/dub.json | 0 .../sample}/b/source/b.d | 0 .../sample}/c/dub.json | 0 .../sample}/c/source/c.d | 0 .../source/app.d | 22 +++++++++++++++++++ 16 files changed, 38 insertions(+), 61 deletions(-) delete mode 100755 test/issue2587-subpackage-dependency-resolution.sh delete mode 100644 test/issue2587-subpackage-dependency-resolution/.no_build delete mode 100644 test/issue2587-subpackage-dependency-resolution/.no_run delete mode 100644 test/issue2587-subpackage-dependency-resolution/.no_test delete mode 100644 test/issue2587-subpackage-dependency-resolution/a/.gitignore delete mode 100644 test/issue2587-subpackage-dependency-resolution/b/.gitignore delete mode 100644 test/issue2587-subpackage-dependency-resolution/c/.gitignore create mode 100644 test/new_tests/issue2587-subpackage-dependency-resolution/.gitignore create mode 100644 test/new_tests/issue2587-subpackage-dependency-resolution/dub.json rename test/{issue2587-subpackage-dependency-resolution => new_tests/issue2587-subpackage-dependency-resolution/sample}/a/dub.json (100%) rename test/{issue2587-subpackage-dependency-resolution => new_tests/issue2587-subpackage-dependency-resolution/sample}/a/source/app.d (100%) rename test/{issue2587-subpackage-dependency-resolution => new_tests/issue2587-subpackage-dependency-resolution/sample}/b/dub.json (100%) rename test/{issue2587-subpackage-dependency-resolution => new_tests/issue2587-subpackage-dependency-resolution/sample}/b/source/b.d (100%) rename test/{issue2587-subpackage-dependency-resolution => new_tests/issue2587-subpackage-dependency-resolution/sample}/c/dub.json (100%) rename test/{issue2587-subpackage-dependency-resolution => new_tests/issue2587-subpackage-dependency-resolution/sample}/c/source/c.d (100%) create mode 100644 test/new_tests/issue2587-subpackage-dependency-resolution/source/app.d diff --git a/test/issue2587-subpackage-dependency-resolution.sh b/test/issue2587-subpackage-dependency-resolution.sh deleted file mode 100755 index bee14545c3..0000000000 --- a/test/issue2587-subpackage-dependency-resolution.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash - -set -e - -. $(dirname "${BASH_SOURCE[0]}")/common.sh -cd "${CURR_DIR}/issue2587-subpackage-dependency-resolution/a" - -rm -f dub.selections.json -$DUB upgrade -v -$DUB run - -rm -f dub.selections.json -$DUB run diff --git a/test/issue2587-subpackage-dependency-resolution/.no_build b/test/issue2587-subpackage-dependency-resolution/.no_build deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/issue2587-subpackage-dependency-resolution/.no_run b/test/issue2587-subpackage-dependency-resolution/.no_run deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/issue2587-subpackage-dependency-resolution/.no_test b/test/issue2587-subpackage-dependency-resolution/.no_test deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/issue2587-subpackage-dependency-resolution/a/.gitignore b/test/issue2587-subpackage-dependency-resolution/a/.gitignore deleted file mode 100644 index 7b9e404d30..0000000000 --- a/test/issue2587-subpackage-dependency-resolution/a/.gitignore +++ /dev/null @@ -1,16 +0,0 @@ -.dub -docs.json -__dummy.html -docs/ -/a -a.so -a.dylib -a.dll -a.a -a.lib -a-test-* -*.exe -*.pdb -*.o -*.obj -*.lst diff --git a/test/issue2587-subpackage-dependency-resolution/b/.gitignore b/test/issue2587-subpackage-dependency-resolution/b/.gitignore deleted file mode 100644 index d699f7ef5a..0000000000 --- a/test/issue2587-subpackage-dependency-resolution/b/.gitignore +++ /dev/null @@ -1,16 +0,0 @@ -.dub -docs.json -__dummy.html -docs/ -/b -b.so -b.dylib -b.dll -b.a -b.lib -b-test-* -*.exe -*.pdb -*.o -*.obj -*.lst diff --git a/test/issue2587-subpackage-dependency-resolution/c/.gitignore b/test/issue2587-subpackage-dependency-resolution/c/.gitignore deleted file mode 100644 index 7c7bbbd45b..0000000000 --- a/test/issue2587-subpackage-dependency-resolution/c/.gitignore +++ /dev/null @@ -1,16 +0,0 @@ -.dub -docs.json -__dummy.html -docs/ -/c -c.so -c.dylib -c.dll -c.a -c.lib -c-test-* -*.exe -*.pdb -*.o -*.obj -*.lst diff --git a/test/new_tests/issue2587-subpackage-dependency-resolution/.gitignore b/test/new_tests/issue2587-subpackage-dependency-resolution/.gitignore new file mode 100644 index 0000000000..efecf2fea6 --- /dev/null +++ b/test/new_tests/issue2587-subpackage-dependency-resolution/.gitignore @@ -0,0 +1,8 @@ +/sample/** +!/sample/ +!/sample/a/ +!/sample/b/ +!/sample/c/ +!/sample/*/dub.json +!/sample/*/source/ +!/sample/*/source/*.d diff --git a/test/new_tests/issue2587-subpackage-dependency-resolution/dub.json b/test/new_tests/issue2587-subpackage-dependency-resolution/dub.json new file mode 100644 index 0000000000..9e877a96e7 --- /dev/null +++ b/test/new_tests/issue2587-subpackage-dependency-resolution/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue2587-subpackage-dependency-resolution", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/issue2587-subpackage-dependency-resolution/a/dub.json b/test/new_tests/issue2587-subpackage-dependency-resolution/sample/a/dub.json similarity index 100% rename from test/issue2587-subpackage-dependency-resolution/a/dub.json rename to test/new_tests/issue2587-subpackage-dependency-resolution/sample/a/dub.json diff --git a/test/issue2587-subpackage-dependency-resolution/a/source/app.d b/test/new_tests/issue2587-subpackage-dependency-resolution/sample/a/source/app.d similarity index 100% rename from test/issue2587-subpackage-dependency-resolution/a/source/app.d rename to test/new_tests/issue2587-subpackage-dependency-resolution/sample/a/source/app.d diff --git a/test/issue2587-subpackage-dependency-resolution/b/dub.json b/test/new_tests/issue2587-subpackage-dependency-resolution/sample/b/dub.json similarity index 100% rename from test/issue2587-subpackage-dependency-resolution/b/dub.json rename to test/new_tests/issue2587-subpackage-dependency-resolution/sample/b/dub.json diff --git a/test/issue2587-subpackage-dependency-resolution/b/source/b.d b/test/new_tests/issue2587-subpackage-dependency-resolution/sample/b/source/b.d similarity index 100% rename from test/issue2587-subpackage-dependency-resolution/b/source/b.d rename to test/new_tests/issue2587-subpackage-dependency-resolution/sample/b/source/b.d diff --git a/test/issue2587-subpackage-dependency-resolution/c/dub.json b/test/new_tests/issue2587-subpackage-dependency-resolution/sample/c/dub.json similarity index 100% rename from test/issue2587-subpackage-dependency-resolution/c/dub.json rename to test/new_tests/issue2587-subpackage-dependency-resolution/sample/c/dub.json diff --git a/test/issue2587-subpackage-dependency-resolution/c/source/c.d b/test/new_tests/issue2587-subpackage-dependency-resolution/sample/c/source/c.d similarity index 100% rename from test/issue2587-subpackage-dependency-resolution/c/source/c.d rename to test/new_tests/issue2587-subpackage-dependency-resolution/sample/c/source/c.d diff --git a/test/new_tests/issue2587-subpackage-dependency-resolution/source/app.d b/test/new_tests/issue2587-subpackage-dependency-resolution/source/app.d new file mode 100644 index 0000000000..4ffafa1741 --- /dev/null +++ b/test/new_tests/issue2587-subpackage-dependency-resolution/source/app.d @@ -0,0 +1,22 @@ +import common; + +import std.algorithm; +import std.file; +import std.path; +import std.process; + +void main () { + chdir("sample/a"); + if (exists("dub.selections.json")) remove("dub.selections.json"); + + if (spawnProcess([dub, "upgrade", "-v"]).wait != 0) + die("Dub upgrade failed"); + + if (spawnProcess([dub, "run"]).wait != 0) + die("Dub run after generating dub.selections.json failed"); + + remove("dub.selections.json"); + + if (spawnProcess([dub, "run"]).wait != 0) + die("Dub run without dub.selections.json failed"); +} From 5614ba1bdfb7d9fe1eebb1defb29ec12820a12e6 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Tue, 22 Jul 2025 22:19:35 +0300 Subject: [PATCH 126/187] issue2650-deprecated-modules Signed-off-by: Andrei Horodniceanu --- test/issue2650-deprecated-modules/.no_build | 0 test/issue2650-deprecated-modules/.no_run | 0 test/{ => new_tests}/issue2650-deprecated-modules/dub.sdl | 0 test/{ => new_tests}/issue2650-deprecated-modules/source/test.d | 0 test/new_tests/issue2650-deprecated-modules/test.config | 1 + 5 files changed, 1 insertion(+) delete mode 100644 test/issue2650-deprecated-modules/.no_build delete mode 100644 test/issue2650-deprecated-modules/.no_run rename test/{ => new_tests}/issue2650-deprecated-modules/dub.sdl (100%) rename test/{ => new_tests}/issue2650-deprecated-modules/source/test.d (100%) create mode 100644 test/new_tests/issue2650-deprecated-modules/test.config diff --git a/test/issue2650-deprecated-modules/.no_build b/test/issue2650-deprecated-modules/.no_build deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/issue2650-deprecated-modules/.no_run b/test/issue2650-deprecated-modules/.no_run deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/issue2650-deprecated-modules/dub.sdl b/test/new_tests/issue2650-deprecated-modules/dub.sdl similarity index 100% rename from test/issue2650-deprecated-modules/dub.sdl rename to test/new_tests/issue2650-deprecated-modules/dub.sdl diff --git a/test/issue2650-deprecated-modules/source/test.d b/test/new_tests/issue2650-deprecated-modules/source/test.d similarity index 100% rename from test/issue2650-deprecated-modules/source/test.d rename to test/new_tests/issue2650-deprecated-modules/source/test.d diff --git a/test/new_tests/issue2650-deprecated-modules/test.config b/test/new_tests/issue2650-deprecated-modules/test.config new file mode 100644 index 0000000000..a911f5cd05 --- /dev/null +++ b/test/new_tests/issue2650-deprecated-modules/test.config @@ -0,0 +1 @@ +dub_command = test \ No newline at end of file From cf9648432cd47524306145c602f9dc5716e9d6ad Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Tue, 22 Jul 2025 22:24:07 +0300 Subject: [PATCH 127/187] issue2684-recipe-file Signed-off-by: Andrei Horodniceanu --- test/issue2684-recipe-file.sh | 5 ---- test/issue2684-recipe-file/.gitignore | 16 ------------- .../issue2684-recipe-file/.gitignore | 8 +++++++ test/new_tests/issue2684-recipe-file/dub.json | 8 +++++++ .../sample}/anotherSource/app.d | 0 .../issue2684-recipe-file/sample}/dub.json | 0 .../sample}/dubWithAnotherSource.json | 0 .../sample}/source/app.d | 0 .../issue2684-recipe-file/source/app.d | 23 +++++++++++++++++++ 9 files changed, 39 insertions(+), 21 deletions(-) delete mode 100755 test/issue2684-recipe-file.sh delete mode 100644 test/issue2684-recipe-file/.gitignore create mode 100644 test/new_tests/issue2684-recipe-file/.gitignore create mode 100644 test/new_tests/issue2684-recipe-file/dub.json rename test/{issue2684-recipe-file => new_tests/issue2684-recipe-file/sample}/anotherSource/app.d (100%) rename test/{issue2684-recipe-file => new_tests/issue2684-recipe-file/sample}/dub.json (100%) rename test/{issue2684-recipe-file => new_tests/issue2684-recipe-file/sample}/dubWithAnotherSource.json (100%) rename test/{issue2684-recipe-file => new_tests/issue2684-recipe-file/sample}/source/app.d (100%) create mode 100644 test/new_tests/issue2684-recipe-file/source/app.d diff --git a/test/issue2684-recipe-file.sh b/test/issue2684-recipe-file.sh deleted file mode 100755 index 2567395464..0000000000 --- a/test/issue2684-recipe-file.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -cd ${CURR_DIR}/issue2684-recipe-file -${DUB} | grep -c "This was built using dub.json" > /dev/null -${DUB} --recipe=dubWithAnotherSource.json | grep -c "This was built using dubWithAnotherSource.json" > /dev/null \ No newline at end of file diff --git a/test/issue2684-recipe-file/.gitignore b/test/issue2684-recipe-file/.gitignore deleted file mode 100644 index 3de530e06c..0000000000 --- a/test/issue2684-recipe-file/.gitignore +++ /dev/null @@ -1,16 +0,0 @@ -.dub -docs.json -__dummy.html -docs/ -/issue2684-recipe-file -issue2684-recipe-file.so -issue2684-recipe-file.dylib -issue2684-recipe-file.dll -issue2684-recipe-file.a -issue2684-recipe-file.lib -issue2684-recipe-file-test-* -*.exe -*.pdb -*.o -*.obj -*.lst diff --git a/test/new_tests/issue2684-recipe-file/.gitignore b/test/new_tests/issue2684-recipe-file/.gitignore new file mode 100644 index 0000000000..9cdbcf5794 --- /dev/null +++ b/test/new_tests/issue2684-recipe-file/.gitignore @@ -0,0 +1,8 @@ +/sample/** +!/sample/ +!/sample/dub.json +!/sample/dubWithAnotherSource.json +!/sample/source/ +!/sample/source/*.d +!/sample/anotherSource/ +!/sample/anotherSource/*.d diff --git a/test/new_tests/issue2684-recipe-file/dub.json b/test/new_tests/issue2684-recipe-file/dub.json new file mode 100644 index 0000000000..20464aeda4 --- /dev/null +++ b/test/new_tests/issue2684-recipe-file/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue2684-recipe-file", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/issue2684-recipe-file/anotherSource/app.d b/test/new_tests/issue2684-recipe-file/sample/anotherSource/app.d similarity index 100% rename from test/issue2684-recipe-file/anotherSource/app.d rename to test/new_tests/issue2684-recipe-file/sample/anotherSource/app.d diff --git a/test/issue2684-recipe-file/dub.json b/test/new_tests/issue2684-recipe-file/sample/dub.json similarity index 100% rename from test/issue2684-recipe-file/dub.json rename to test/new_tests/issue2684-recipe-file/sample/dub.json diff --git a/test/issue2684-recipe-file/dubWithAnotherSource.json b/test/new_tests/issue2684-recipe-file/sample/dubWithAnotherSource.json similarity index 100% rename from test/issue2684-recipe-file/dubWithAnotherSource.json rename to test/new_tests/issue2684-recipe-file/sample/dubWithAnotherSource.json diff --git a/test/issue2684-recipe-file/source/app.d b/test/new_tests/issue2684-recipe-file/sample/source/app.d similarity index 100% rename from test/issue2684-recipe-file/source/app.d rename to test/new_tests/issue2684-recipe-file/sample/source/app.d diff --git a/test/new_tests/issue2684-recipe-file/source/app.d b/test/new_tests/issue2684-recipe-file/source/app.d new file mode 100644 index 0000000000..a1a8737c4e --- /dev/null +++ b/test/new_tests/issue2684-recipe-file/source/app.d @@ -0,0 +1,23 @@ +import common; + +import std.algorithm; +import std.file; +import std.path; +import std.process; +import std.stdio; + +void main () { + chdir("sample"); + + auto p = teeProcess([dub]); + if (p.wait != 0) + die("Plain dub invocation failed"); + if (!p.stdout.canFind("This was built using dub.json")) + die("The executable was not built with dub.json"); + + p = teeProcess([dub, "--recipe=dubWithAnotherSource.json"]); + if (p.wait != 0) + die("dub with custom recipe faile"); + if (!p.stdout.canFind("This was built using dubWithAnotherSource.json")) + die("The executable was not built with dubWithAnotherSource.json"); +} From a4cf2584d10b0d12481e4120bda504e7390c2d3e Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Tue, 22 Jul 2025 22:25:34 +0300 Subject: [PATCH 128/187] issue2698-cimportpaths-broken-with-dmd-ldc Signed-off-by: Andrei Horodniceanu --- .../issue2698-cimportpaths-broken-with-dmd-ldc/.gitignore | 1 + .../issue2698-cimportpaths-broken-with-dmd-ldc/c_headers/foo.h | 0 .../issue2698-cimportpaths-broken-with-dmd-ldc/dub.sdl | 0 .../issue2698-cimportpaths-broken-with-dmd-ldc/source/app.d | 0 .../issue2698-cimportpaths-broken-with-dmd-ldc/source/foo.c | 0 .../issue2698-cimportpaths-broken-with-dmd-ldc/test.config | 1 + 6 files changed, 2 insertions(+) create mode 100644 test/new_tests/issue2698-cimportpaths-broken-with-dmd-ldc/.gitignore rename test/{ => new_tests}/issue2698-cimportpaths-broken-with-dmd-ldc/c_headers/foo.h (100%) rename test/{ => new_tests}/issue2698-cimportpaths-broken-with-dmd-ldc/dub.sdl (100%) rename test/{ => new_tests}/issue2698-cimportpaths-broken-with-dmd-ldc/source/app.d (100%) rename test/{ => new_tests}/issue2698-cimportpaths-broken-with-dmd-ldc/source/foo.c (100%) create mode 100644 test/new_tests/issue2698-cimportpaths-broken-with-dmd-ldc/test.config diff --git a/test/new_tests/issue2698-cimportpaths-broken-with-dmd-ldc/.gitignore b/test/new_tests/issue2698-cimportpaths-broken-with-dmd-ldc/.gitignore new file mode 100644 index 0000000000..8d82cc87ab --- /dev/null +++ b/test/new_tests/issue2698-cimportpaths-broken-with-dmd-ldc/.gitignore @@ -0,0 +1 @@ +!/c_headers \ No newline at end of file diff --git a/test/issue2698-cimportpaths-broken-with-dmd-ldc/c_headers/foo.h b/test/new_tests/issue2698-cimportpaths-broken-with-dmd-ldc/c_headers/foo.h similarity index 100% rename from test/issue2698-cimportpaths-broken-with-dmd-ldc/c_headers/foo.h rename to test/new_tests/issue2698-cimportpaths-broken-with-dmd-ldc/c_headers/foo.h diff --git a/test/issue2698-cimportpaths-broken-with-dmd-ldc/dub.sdl b/test/new_tests/issue2698-cimportpaths-broken-with-dmd-ldc/dub.sdl similarity index 100% rename from test/issue2698-cimportpaths-broken-with-dmd-ldc/dub.sdl rename to test/new_tests/issue2698-cimportpaths-broken-with-dmd-ldc/dub.sdl diff --git a/test/issue2698-cimportpaths-broken-with-dmd-ldc/source/app.d b/test/new_tests/issue2698-cimportpaths-broken-with-dmd-ldc/source/app.d similarity index 100% rename from test/issue2698-cimportpaths-broken-with-dmd-ldc/source/app.d rename to test/new_tests/issue2698-cimportpaths-broken-with-dmd-ldc/source/app.d diff --git a/test/issue2698-cimportpaths-broken-with-dmd-ldc/source/foo.c b/test/new_tests/issue2698-cimportpaths-broken-with-dmd-ldc/source/foo.c similarity index 100% rename from test/issue2698-cimportpaths-broken-with-dmd-ldc/source/foo.c rename to test/new_tests/issue2698-cimportpaths-broken-with-dmd-ldc/source/foo.c diff --git a/test/new_tests/issue2698-cimportpaths-broken-with-dmd-ldc/test.config b/test/new_tests/issue2698-cimportpaths-broken-with-dmd-ldc/test.config new file mode 100644 index 0000000000..76428d98bf --- /dev/null +++ b/test/new_tests/issue2698-cimportpaths-broken-with-dmd-ldc/test.config @@ -0,0 +1 @@ +dc_backend = [dmd, ldc] \ No newline at end of file From e9c2b9748443da08cfc4cd619ed0a2545ebfeb89 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Tue, 22 Jul 2025 22:47:11 +0300 Subject: [PATCH 129/187] issue2840-build-collision Signed-off-by: Andrei Horodniceanu --- test/issue2840-build-collision.sh | 14 ----------- test/issue2840-build-collision/.no_build | 0 .../issue2840-build-collision/.gitignore | 3 +++ .../issue2840-build-collision/dub.json | 8 +++++++ .../issue2840-build-collision/sample}/build.d | 0 .../issue2840-build-collision/source/app.d | 24 +++++++++++++++++++ 6 files changed, 35 insertions(+), 14 deletions(-) delete mode 100755 test/issue2840-build-collision.sh delete mode 100644 test/issue2840-build-collision/.no_build create mode 100644 test/new_tests/issue2840-build-collision/.gitignore create mode 100644 test/new_tests/issue2840-build-collision/dub.json rename test/{issue2840-build-collision => new_tests/issue2840-build-collision/sample}/build.d (100%) create mode 100644 test/new_tests/issue2840-build-collision/source/app.d diff --git a/test/issue2840-build-collision.sh b/test/issue2840-build-collision.sh deleted file mode 100755 index 70ad1cb1b9..0000000000 --- a/test/issue2840-build-collision.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash - -. $(dirname "${BASH_SOURCE[0]}")/common.sh - -pushd $(dirname "${BASH_SOURCE[0]}")/issue2840-build-collision -# Copy before building, as dub uses timestamp to check for rebuild -rm -rf nested/ && mkdir -p nested/ && cp -v build.d nested/ - -$DUB ./build.d $(pwd)/build.d -pushd nested -$DUB ./build.d $(pwd)/build.d -popd - -popd diff --git a/test/issue2840-build-collision/.no_build b/test/issue2840-build-collision/.no_build deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/new_tests/issue2840-build-collision/.gitignore b/test/new_tests/issue2840-build-collision/.gitignore new file mode 100644 index 0000000000..69070a959e --- /dev/null +++ b/test/new_tests/issue2840-build-collision/.gitignore @@ -0,0 +1,3 @@ +/sample/** +!/sample/ +!/sample/build.d diff --git a/test/new_tests/issue2840-build-collision/dub.json b/test/new_tests/issue2840-build-collision/dub.json new file mode 100644 index 0000000000..77837025e8 --- /dev/null +++ b/test/new_tests/issue2840-build-collision/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue2840-build-collision", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/issue2840-build-collision/build.d b/test/new_tests/issue2840-build-collision/sample/build.d similarity index 100% rename from test/issue2840-build-collision/build.d rename to test/new_tests/issue2840-build-collision/sample/build.d diff --git a/test/new_tests/issue2840-build-collision/source/app.d b/test/new_tests/issue2840-build-collision/source/app.d new file mode 100644 index 0000000000..180a27e906 --- /dev/null +++ b/test/new_tests/issue2840-build-collision/source/app.d @@ -0,0 +1,24 @@ +import common; + +import std.algorithm; +import std.file; +import std.path; +import std.process; + +void main () { + chdir("sample"); + if (exists("nested")) rmdirRecurse("nested"); + mkdir("nested"); + copy("build.d", "nested/build.d"); + + if (spawnProcess([dub, "build.d", getcwd().buildPath("build.d")]).wait != 0) + die("Dub build from plain directory failed"); + + { + chdir("nested"); + scope(exit) chdir(".."); + + if (spawnProcess([dub, "build.d", getcwd().buildPath("build.d")]).wait != 0) + die("Dub build from nested directory failed"); + } +} From 8d823b0e161c8655feae5bd495926d0dc7ae7fb9 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Tue, 22 Jul 2025 23:04:07 +0300 Subject: [PATCH 130/187] issue346-redundant-flags Signed-off-by: Andrei Horodniceanu --- test/issue346-redundant-flags.sh | 5 ----- test/issue346-redundant-flags/.no_build | 0 test/issue346-redundant-flags/.no_run | 0 test/issue346-redundant-flags/.no_test | 0 .../issue346-redundant-flags/.gitignore | 8 ++++++++ .../issue346-redundant-flags/dub.json | 8 ++++++++ .../sample}/a/dub.json | 2 +- .../sample}/a/source/a.d | 0 .../sample}/b/dub.json | 2 +- .../sample}/b/source/b.d | 0 .../sample}/main/dub.json | 2 +- .../sample}/main/source/main.d | 0 .../issue346-redundant-flags/source/app.d | 19 +++++++++++++++++++ 13 files changed, 38 insertions(+), 8 deletions(-) delete mode 100755 test/issue346-redundant-flags.sh delete mode 100644 test/issue346-redundant-flags/.no_build delete mode 100644 test/issue346-redundant-flags/.no_run delete mode 100644 test/issue346-redundant-flags/.no_test create mode 100644 test/new_tests/issue346-redundant-flags/.gitignore create mode 100644 test/new_tests/issue346-redundant-flags/dub.json rename test/{issue346-redundant-flags => new_tests/issue346-redundant-flags/sample}/a/dub.json (88%) rename test/{issue346-redundant-flags => new_tests/issue346-redundant-flags/sample}/a/source/a.d (100%) rename test/{issue346-redundant-flags => new_tests/issue346-redundant-flags/sample}/b/dub.json (88%) rename test/{issue346-redundant-flags => new_tests/issue346-redundant-flags/sample}/b/source/b.d (100%) rename test/{issue346-redundant-flags => new_tests/issue346-redundant-flags/sample}/main/dub.json (97%) rename test/{issue346-redundant-flags => new_tests/issue346-redundant-flags/sample}/main/source/main.d (100%) create mode 100644 test/new_tests/issue346-redundant-flags/source/app.d diff --git a/test/issue346-redundant-flags.sh b/test/issue346-redundant-flags.sh deleted file mode 100755 index c6b27f2fba..0000000000 --- a/test/issue346-redundant-flags.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash - -. $(dirname "${BASH_SOURCE[0]}")/common.sh -cd ${CURR_DIR}/issue346-redundant-flags -${DUB} build --bare --force --compiler=${DC} -a x86_64 -v main 2>&1 | { ! grep -e '-m64 -m64' -c; } diff --git a/test/issue346-redundant-flags/.no_build b/test/issue346-redundant-flags/.no_build deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/issue346-redundant-flags/.no_run b/test/issue346-redundant-flags/.no_run deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/issue346-redundant-flags/.no_test b/test/issue346-redundant-flags/.no_test deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/new_tests/issue346-redundant-flags/.gitignore b/test/new_tests/issue346-redundant-flags/.gitignore new file mode 100644 index 0000000000..d2eeb714d6 --- /dev/null +++ b/test/new_tests/issue346-redundant-flags/.gitignore @@ -0,0 +1,8 @@ +/sample/** +!/sample/ +!/sample/a/ +!/sample/b/ +!/sample/main/ +!/sample/*/dub.json +!/sample/*/source/ +!/sample/*/source/*.d diff --git a/test/new_tests/issue346-redundant-flags/dub.json b/test/new_tests/issue346-redundant-flags/dub.json new file mode 100644 index 0000000000..a243fc6340 --- /dev/null +++ b/test/new_tests/issue346-redundant-flags/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue346-redundant-flags", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/issue346-redundant-flags/a/dub.json b/test/new_tests/issue346-redundant-flags/sample/a/dub.json similarity index 88% rename from test/issue346-redundant-flags/a/dub.json rename to test/new_tests/issue346-redundant-flags/sample/a/dub.json index 5b911819d9..16c3d03c3a 100644 --- a/test/issue346-redundant-flags/a/dub.json +++ b/test/new_tests/issue346-redundant-flags/sample/a/dub.json @@ -1,3 +1,3 @@ { "name": "a" -} \ No newline at end of file +} diff --git a/test/issue346-redundant-flags/a/source/a.d b/test/new_tests/issue346-redundant-flags/sample/a/source/a.d similarity index 100% rename from test/issue346-redundant-flags/a/source/a.d rename to test/new_tests/issue346-redundant-flags/sample/a/source/a.d diff --git a/test/issue346-redundant-flags/b/dub.json b/test/new_tests/issue346-redundant-flags/sample/b/dub.json similarity index 88% rename from test/issue346-redundant-flags/b/dub.json rename to test/new_tests/issue346-redundant-flags/sample/b/dub.json index 2824d72989..2697a7f0fc 100644 --- a/test/issue346-redundant-flags/b/dub.json +++ b/test/new_tests/issue346-redundant-flags/sample/b/dub.json @@ -1,3 +1,3 @@ { "name": "b" -} \ No newline at end of file +} diff --git a/test/issue346-redundant-flags/b/source/b.d b/test/new_tests/issue346-redundant-flags/sample/b/source/b.d similarity index 100% rename from test/issue346-redundant-flags/b/source/b.d rename to test/new_tests/issue346-redundant-flags/sample/b/source/b.d diff --git a/test/issue346-redundant-flags/main/dub.json b/test/new_tests/issue346-redundant-flags/sample/main/dub.json similarity index 97% rename from test/issue346-redundant-flags/main/dub.json rename to test/new_tests/issue346-redundant-flags/sample/main/dub.json index 0160e794aa..8c72d54f37 100644 --- a/test/issue346-redundant-flags/main/dub.json +++ b/test/new_tests/issue346-redundant-flags/sample/main/dub.json @@ -4,4 +4,4 @@ "a": {"path": "../a"}, "b": {"path": "../b"} } -} \ No newline at end of file +} diff --git a/test/issue346-redundant-flags/main/source/main.d b/test/new_tests/issue346-redundant-flags/sample/main/source/main.d similarity index 100% rename from test/issue346-redundant-flags/main/source/main.d rename to test/new_tests/issue346-redundant-flags/sample/main/source/main.d diff --git a/test/new_tests/issue346-redundant-flags/source/app.d b/test/new_tests/issue346-redundant-flags/source/app.d new file mode 100644 index 0000000000..cdb4265597 --- /dev/null +++ b/test/new_tests/issue346-redundant-flags/source/app.d @@ -0,0 +1,19 @@ +import common; + +import std.algorithm; +import std.file; +import std.path; +import std.process; +import std.stdio; + +void main () { + chdir("sample"); + auto p = teeProcess([dub, "build", "--bare", "--force", "-a", "x86_64", "-v", "main"], Redirect.stdout | Redirect.stderrToStdout); + p.wait; + + if (p.stdout.canFind("-m64 -m64")) + die("Arch switch appeared twice"); + + if (p.wait != 0) + die("Dub build failed"); +} From b971c50513ed53ac1d9a8f66d14039d1005b3782 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Wed, 23 Jul 2025 19:20:52 +0300 Subject: [PATCH 131/187] issue361-optional-deps Signed-off-by: Andrei Horodniceanu --- test/issue361-optional-deps.sh | 27 ---------- test/issue361-optional-deps/.no_build | 0 .../issue361-optional-deps/.gitignore | 12 +++++ .../new_tests/issue361-optional-deps/dub.json | 8 +++ .../issue361-optional-deps/sample}/a/dub.sdl | 0 .../issue361-optional-deps/sample}/a/src/a.d | 0 .../issue361-optional-deps/sample}/b/dub.sdl | 0 .../issue361-optional-deps/sample}/b/src/b.d | 0 .../sample}/main1/dub.sdl | 0 .../sample}/main1/src/main1.d | 0 .../sample}/main2/dub.sdl | 0 .../sample}/main2/dub.selections.json | 0 .../sample}/main2/src/main2.d | 0 .../issue361-optional-deps/source/app.d | 52 +++++++++++++++++++ 14 files changed, 72 insertions(+), 27 deletions(-) delete mode 100755 test/issue361-optional-deps.sh delete mode 100644 test/issue361-optional-deps/.no_build create mode 100644 test/new_tests/issue361-optional-deps/.gitignore create mode 100644 test/new_tests/issue361-optional-deps/dub.json rename test/{issue361-optional-deps => new_tests/issue361-optional-deps/sample}/a/dub.sdl (100%) rename test/{issue361-optional-deps => new_tests/issue361-optional-deps/sample}/a/src/a.d (100%) rename test/{issue361-optional-deps => new_tests/issue361-optional-deps/sample}/b/dub.sdl (100%) rename test/{issue361-optional-deps => new_tests/issue361-optional-deps/sample}/b/src/b.d (100%) rename test/{issue361-optional-deps => new_tests/issue361-optional-deps/sample}/main1/dub.sdl (100%) rename test/{issue361-optional-deps => new_tests/issue361-optional-deps/sample}/main1/src/main1.d (100%) rename test/{issue361-optional-deps => new_tests/issue361-optional-deps/sample}/main2/dub.sdl (100%) rename test/{issue361-optional-deps => new_tests/issue361-optional-deps/sample}/main2/dub.selections.json (100%) rename test/{issue361-optional-deps => new_tests/issue361-optional-deps/sample}/main2/src/main2.d (100%) create mode 100644 test/new_tests/issue361-optional-deps/source/app.d diff --git a/test/issue361-optional-deps.sh b/test/issue361-optional-deps.sh deleted file mode 100755 index db87794498..0000000000 --- a/test/issue361-optional-deps.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env bash - -. $(dirname "${BASH_SOURCE[0]}")/common.sh -cd ${CURR_DIR}/issue361-optional-deps -rm -rf a/.dub -rm -rf a/b/.dub -rm -rf main1/.dub -rm -rf main2/.dub -rm -f main1/dub.selections.json - -${DUB} build --bare --compiler=${DC} main1 -echo "{" > cmp.tmp -echo " \"fileVersion\": 1," >> cmp.tmp -echo " \"versions\": {" >> cmp.tmp -echo " \"b\": \"~master\"" >> cmp.tmp -echo " }" >> cmp.tmp -echo "}" >> cmp.tmp -diff cmp.tmp main1/dub.selections.json - -${DUB} build --bare --compiler=${DC} main2 -echo "{" > cmp.tmp -echo " \"fileVersion\": 1," >> cmp.tmp -echo " \"versions\": {" >> cmp.tmp -echo " \"a\": \"~master\"" >> cmp.tmp -echo " }" >> cmp.tmp -echo "}" >> cmp.tmp -diff cmp.tmp main2/dub.selections.json diff --git a/test/issue361-optional-deps/.no_build b/test/issue361-optional-deps/.no_build deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/new_tests/issue361-optional-deps/.gitignore b/test/new_tests/issue361-optional-deps/.gitignore new file mode 100644 index 0000000000..b9c0de52e5 --- /dev/null +++ b/test/new_tests/issue361-optional-deps/.gitignore @@ -0,0 +1,12 @@ +/sample/** +!/sample/ +!/sample/a/ +!/sample/b/ +!/sample/main1/ +!/sample/main2/ + +!/sample/*/dub.sdl +!/sample/*/src/ +!/sample/*/src/*.d + +!/sample/main2/dub.selections.json diff --git a/test/new_tests/issue361-optional-deps/dub.json b/test/new_tests/issue361-optional-deps/dub.json new file mode 100644 index 0000000000..93d1e3750d --- /dev/null +++ b/test/new_tests/issue361-optional-deps/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue361-optional-deps", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/issue361-optional-deps/a/dub.sdl b/test/new_tests/issue361-optional-deps/sample/a/dub.sdl similarity index 100% rename from test/issue361-optional-deps/a/dub.sdl rename to test/new_tests/issue361-optional-deps/sample/a/dub.sdl diff --git a/test/issue361-optional-deps/a/src/a.d b/test/new_tests/issue361-optional-deps/sample/a/src/a.d similarity index 100% rename from test/issue361-optional-deps/a/src/a.d rename to test/new_tests/issue361-optional-deps/sample/a/src/a.d diff --git a/test/issue361-optional-deps/b/dub.sdl b/test/new_tests/issue361-optional-deps/sample/b/dub.sdl similarity index 100% rename from test/issue361-optional-deps/b/dub.sdl rename to test/new_tests/issue361-optional-deps/sample/b/dub.sdl diff --git a/test/issue361-optional-deps/b/src/b.d b/test/new_tests/issue361-optional-deps/sample/b/src/b.d similarity index 100% rename from test/issue361-optional-deps/b/src/b.d rename to test/new_tests/issue361-optional-deps/sample/b/src/b.d diff --git a/test/issue361-optional-deps/main1/dub.sdl b/test/new_tests/issue361-optional-deps/sample/main1/dub.sdl similarity index 100% rename from test/issue361-optional-deps/main1/dub.sdl rename to test/new_tests/issue361-optional-deps/sample/main1/dub.sdl diff --git a/test/issue361-optional-deps/main1/src/main1.d b/test/new_tests/issue361-optional-deps/sample/main1/src/main1.d similarity index 100% rename from test/issue361-optional-deps/main1/src/main1.d rename to test/new_tests/issue361-optional-deps/sample/main1/src/main1.d diff --git a/test/issue361-optional-deps/main2/dub.sdl b/test/new_tests/issue361-optional-deps/sample/main2/dub.sdl similarity index 100% rename from test/issue361-optional-deps/main2/dub.sdl rename to test/new_tests/issue361-optional-deps/sample/main2/dub.sdl diff --git a/test/issue361-optional-deps/main2/dub.selections.json b/test/new_tests/issue361-optional-deps/sample/main2/dub.selections.json similarity index 100% rename from test/issue361-optional-deps/main2/dub.selections.json rename to test/new_tests/issue361-optional-deps/sample/main2/dub.selections.json diff --git a/test/issue361-optional-deps/main2/src/main2.d b/test/new_tests/issue361-optional-deps/sample/main2/src/main2.d similarity index 100% rename from test/issue361-optional-deps/main2/src/main2.d rename to test/new_tests/issue361-optional-deps/sample/main2/src/main2.d diff --git a/test/new_tests/issue361-optional-deps/source/app.d b/test/new_tests/issue361-optional-deps/source/app.d new file mode 100644 index 0000000000..02d251cbdf --- /dev/null +++ b/test/new_tests/issue361-optional-deps/source/app.d @@ -0,0 +1,52 @@ +import common; + +import std.algorithm; +import std.conv; +import std.file; +import std.path; +import std.process; +import std.range; +import std.stdio : File; +import std.string; + +void main () { + chdir("sample"); + + foreach (dir; ["a/.dub", "a/b/.dub", "main1/.dub", "main2/.dub"]) + if (exists(dir)) rmdirRecurse(dir); + if (exists("main1/dub.selections.json")) + remove("main1/dub.selections.json"); + + if (spawnProcess([dub, "build", "--bare", "main1"]).wait != 0) + die("dub build main1 failed"); + immutable exp1 = [ + `{`, + "\t\"fileVersion\": 1,", + "\t\"versions\": {", + "\t\t\"b\": \"~master\"", + "\t}", + "}", + ]; + foreach (got, exp; lockstep(File("main1/dub.selections.json").byLine, exp1)) { + got = got.chomp; + if (got != exp) + die("main1 test: got ", text([got]), " but expected ", text([exp])); + } + + + if (spawnProcess([dub, "build", "--bare", "main2"]).wait != 0) + die("dub build main2 failed"); + immutable exp2 = [ + `{`, + "\t\"fileVersion\": 1,", + "\t\"versions\": {", + "\t\t\"a\": \"~master\"", + "\t}", + "}", + ]; + foreach (got, exp; lockstep(File("main2/dub.selections.json").byLine, exp2)) { + got = got.chomp; + if (got != exp) + die("main2 test: got ", text([got]), " but expected ", text([exp])); + } +} From a6b86b8a97a51097ec28f4ffbdee949a36592535 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Wed, 23 Jul 2025 19:26:19 +0300 Subject: [PATCH 132/187] issue502-root-import Move the assert out of the unittest since a unittest in the main file is never run. Signed-off-by: Andrei Horodniceanu --- test/{ => new_tests}/issue502-root-import/dub.json | 0 test/{ => new_tests}/issue502-root-import/source/app.d | 6 +----- 2 files changed, 1 insertion(+), 5 deletions(-) rename test/{ => new_tests}/issue502-root-import/dub.json (100%) rename test/{ => new_tests}/issue502-root-import/source/app.d (89%) diff --git a/test/issue502-root-import/dub.json b/test/new_tests/issue502-root-import/dub.json similarity index 100% rename from test/issue502-root-import/dub.json rename to test/new_tests/issue502-root-import/dub.json diff --git a/test/issue502-root-import/source/app.d b/test/new_tests/issue502-root-import/source/app.d similarity index 89% rename from test/issue502-root-import/source/app.d rename to test/new_tests/issue502-root-import/source/app.d index 9241919256..d4f19a6a4a 100644 --- a/test/issue502-root-import/source/app.d +++ b/test/new_tests/issue502-root-import/source/app.d @@ -1,10 +1,6 @@ import gitcompatibledubpackage.subdir.file; void main(string[] args) -{ -} - -unittest { assert(!hasTheWorldExploded()); -} \ No newline at end of file +} From 5ac89c0e34471d89aeb919f26f58e233ddbc2c84 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Wed, 23 Jul 2025 20:09:21 +0300 Subject: [PATCH 133/187] issue564-invalid-upgrade-dependency Signed-off-by: Andrei Horodniceanu --- test/issue564-invalid-upgrade-dependency.sh | 8 -------- .../.no_build | 0 .../.no_run | 0 .../.no_test | 0 .../a-1.0.0/dub.json | 4 ---- .../.gitignore | 12 ++++++++++++ .../dub.json | 8 ++++++++ .../sample/a-1.0.0/dub.json | 4 ++++ .../sample}/a-1.0.0/source/a.d | 0 .../sample}/a-1.1.0/dub.json | 0 .../sample}/a-1.1.0/source/a.d | 0 .../sample}/main/dub.json | 0 .../sample}/main/dub.selections.json | 0 .../sample}/main/source/app.d | 0 .../source/app.d | 19 +++++++++++++++++++ 15 files changed, 43 insertions(+), 12 deletions(-) delete mode 100755 test/issue564-invalid-upgrade-dependency.sh delete mode 100644 test/issue564-invalid-upgrade-dependency/.no_build delete mode 100644 test/issue564-invalid-upgrade-dependency/.no_run delete mode 100644 test/issue564-invalid-upgrade-dependency/.no_test delete mode 100644 test/issue564-invalid-upgrade-dependency/a-1.0.0/dub.json create mode 100644 test/new_tests/issue564-invalid-upgrade-dependency/.gitignore create mode 100644 test/new_tests/issue564-invalid-upgrade-dependency/dub.json create mode 100644 test/new_tests/issue564-invalid-upgrade-dependency/sample/a-1.0.0/dub.json rename test/{issue564-invalid-upgrade-dependency => new_tests/issue564-invalid-upgrade-dependency/sample}/a-1.0.0/source/a.d (100%) rename test/{issue564-invalid-upgrade-dependency => new_tests/issue564-invalid-upgrade-dependency/sample}/a-1.1.0/dub.json (100%) rename test/{issue564-invalid-upgrade-dependency => new_tests/issue564-invalid-upgrade-dependency/sample}/a-1.1.0/source/a.d (100%) rename test/{issue564-invalid-upgrade-dependency => new_tests/issue564-invalid-upgrade-dependency/sample}/main/dub.json (100%) rename test/{issue564-invalid-upgrade-dependency => new_tests/issue564-invalid-upgrade-dependency/sample}/main/dub.selections.json (100%) rename test/{issue564-invalid-upgrade-dependency => new_tests/issue564-invalid-upgrade-dependency/sample}/main/source/app.d (100%) create mode 100644 test/new_tests/issue564-invalid-upgrade-dependency/source/app.d diff --git a/test/issue564-invalid-upgrade-dependency.sh b/test/issue564-invalid-upgrade-dependency.sh deleted file mode 100755 index 19258cec2c..0000000000 --- a/test/issue564-invalid-upgrade-dependency.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash - -. $(dirname "${BASH_SOURCE[0]}")/common.sh -cd ${CURR_DIR}/issue564-invalid-upgrade-dependency -rm -rf a-1.0.0/.dub -rm -rf a-1.1.0/.dub -rm -rf main/.dub -${DUB} build --bare --compiler=${DC} main diff --git a/test/issue564-invalid-upgrade-dependency/.no_build b/test/issue564-invalid-upgrade-dependency/.no_build deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/issue564-invalid-upgrade-dependency/.no_run b/test/issue564-invalid-upgrade-dependency/.no_run deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/issue564-invalid-upgrade-dependency/.no_test b/test/issue564-invalid-upgrade-dependency/.no_test deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/issue564-invalid-upgrade-dependency/a-1.0.0/dub.json b/test/issue564-invalid-upgrade-dependency/a-1.0.0/dub.json deleted file mode 100644 index cc36ecba79..0000000000 --- a/test/issue564-invalid-upgrade-dependency/a-1.0.0/dub.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "a", - "version": "1.0.0", -} diff --git a/test/new_tests/issue564-invalid-upgrade-dependency/.gitignore b/test/new_tests/issue564-invalid-upgrade-dependency/.gitignore new file mode 100644 index 0000000000..3ca9d49a5d --- /dev/null +++ b/test/new_tests/issue564-invalid-upgrade-dependency/.gitignore @@ -0,0 +1,12 @@ +/sample/** +!/sample/ + +!/sample/a-1.0.0/ +!/sample/a-1.1.0/ +!/sample/main/ + +!/sample/*/dub.json +!/sample/*/source/ +!/sample/*/source/*.d + +!/sample/main/dub.selections.json diff --git a/test/new_tests/issue564-invalid-upgrade-dependency/dub.json b/test/new_tests/issue564-invalid-upgrade-dependency/dub.json new file mode 100644 index 0000000000..f473ed411e --- /dev/null +++ b/test/new_tests/issue564-invalid-upgrade-dependency/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue564-invalid-upgrade-dependency", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/new_tests/issue564-invalid-upgrade-dependency/sample/a-1.0.0/dub.json b/test/new_tests/issue564-invalid-upgrade-dependency/sample/a-1.0.0/dub.json new file mode 100644 index 0000000000..95ccbc3f9e --- /dev/null +++ b/test/new_tests/issue564-invalid-upgrade-dependency/sample/a-1.0.0/dub.json @@ -0,0 +1,4 @@ +{ + "name": "a", + "version": "1.0.0" +} diff --git a/test/issue564-invalid-upgrade-dependency/a-1.0.0/source/a.d b/test/new_tests/issue564-invalid-upgrade-dependency/sample/a-1.0.0/source/a.d similarity index 100% rename from test/issue564-invalid-upgrade-dependency/a-1.0.0/source/a.d rename to test/new_tests/issue564-invalid-upgrade-dependency/sample/a-1.0.0/source/a.d diff --git a/test/issue564-invalid-upgrade-dependency/a-1.1.0/dub.json b/test/new_tests/issue564-invalid-upgrade-dependency/sample/a-1.1.0/dub.json similarity index 100% rename from test/issue564-invalid-upgrade-dependency/a-1.1.0/dub.json rename to test/new_tests/issue564-invalid-upgrade-dependency/sample/a-1.1.0/dub.json diff --git a/test/issue564-invalid-upgrade-dependency/a-1.1.0/source/a.d b/test/new_tests/issue564-invalid-upgrade-dependency/sample/a-1.1.0/source/a.d similarity index 100% rename from test/issue564-invalid-upgrade-dependency/a-1.1.0/source/a.d rename to test/new_tests/issue564-invalid-upgrade-dependency/sample/a-1.1.0/source/a.d diff --git a/test/issue564-invalid-upgrade-dependency/main/dub.json b/test/new_tests/issue564-invalid-upgrade-dependency/sample/main/dub.json similarity index 100% rename from test/issue564-invalid-upgrade-dependency/main/dub.json rename to test/new_tests/issue564-invalid-upgrade-dependency/sample/main/dub.json diff --git a/test/issue564-invalid-upgrade-dependency/main/dub.selections.json b/test/new_tests/issue564-invalid-upgrade-dependency/sample/main/dub.selections.json similarity index 100% rename from test/issue564-invalid-upgrade-dependency/main/dub.selections.json rename to test/new_tests/issue564-invalid-upgrade-dependency/sample/main/dub.selections.json diff --git a/test/issue564-invalid-upgrade-dependency/main/source/app.d b/test/new_tests/issue564-invalid-upgrade-dependency/sample/main/source/app.d similarity index 100% rename from test/issue564-invalid-upgrade-dependency/main/source/app.d rename to test/new_tests/issue564-invalid-upgrade-dependency/sample/main/source/app.d diff --git a/test/new_tests/issue564-invalid-upgrade-dependency/source/app.d b/test/new_tests/issue564-invalid-upgrade-dependency/source/app.d new file mode 100644 index 0000000000..c86d1a1599 --- /dev/null +++ b/test/new_tests/issue564-invalid-upgrade-dependency/source/app.d @@ -0,0 +1,19 @@ +import common; + +import std.algorithm; +import std.conv; +import std.file; +import std.path; +import std.process; +import std.range; +import std.stdio; + +void main () { + chdir("sample"); + + foreach (dir; ["a-1.0.0/.dub", "a-1.1.0/.dub", "main/.dub"]) + if (exists(dir)) rmdirRecurse(dir); + + if (spawnProcess([dub, "build", "--bare", "main"]).wait != 0) + die("dub build failed"); +} From 9b2c6b0b919c000c6fbaf895d07838dcfa5e33a1 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 26 Jul 2025 10:08:19 +0300 Subject: [PATCH 134/187] issue586-subpack-dep Signed-off-by: Andrei Horodniceanu --- test/issue586-subpack-dep.sh | 9 --------- test/issue586-subpack-dep/.no_build | 0 test/issue586-subpack-dep/.no_run | 0 test/issue586-subpack-dep/.no_test | 0 .../new_tests/issue586-subpack-dep/.gitignore | 10 ++++++++++ test/new_tests/issue586-subpack-dep/dub.json | 8 ++++++++ .../issue586-subpack-dep/sample}/a/b/dub.sdl | 0 .../sample}/a/b/source/b.d | 0 .../issue586-subpack-dep/sample}/a/dub.sdl | 0 .../issue586-subpack-dep/sample}/a/source/a.d | 0 .../issue586-subpack-dep/sample}/main/dub.sdl | 0 .../sample}/main/dub.selections.json | 0 .../sample}/main/source/c.d | 0 .../issue586-subpack-dep/source/app.d | 19 +++++++++++++++++++ 14 files changed, 37 insertions(+), 9 deletions(-) delete mode 100755 test/issue586-subpack-dep.sh delete mode 100644 test/issue586-subpack-dep/.no_build delete mode 100644 test/issue586-subpack-dep/.no_run delete mode 100644 test/issue586-subpack-dep/.no_test create mode 100644 test/new_tests/issue586-subpack-dep/.gitignore create mode 100644 test/new_tests/issue586-subpack-dep/dub.json rename test/{issue586-subpack-dep => new_tests/issue586-subpack-dep/sample}/a/b/dub.sdl (100%) rename test/{issue586-subpack-dep => new_tests/issue586-subpack-dep/sample}/a/b/source/b.d (100%) rename test/{issue586-subpack-dep => new_tests/issue586-subpack-dep/sample}/a/dub.sdl (100%) rename test/{issue586-subpack-dep => new_tests/issue586-subpack-dep/sample}/a/source/a.d (100%) rename test/{issue586-subpack-dep => new_tests/issue586-subpack-dep/sample}/main/dub.sdl (100%) rename test/{issue586-subpack-dep => new_tests/issue586-subpack-dep/sample}/main/dub.selections.json (100%) rename test/{issue586-subpack-dep => new_tests/issue586-subpack-dep/sample}/main/source/c.d (100%) create mode 100644 test/new_tests/issue586-subpack-dep/source/app.d diff --git a/test/issue586-subpack-dep.sh b/test/issue586-subpack-dep.sh deleted file mode 100755 index 306bca74b8..0000000000 --- a/test/issue586-subpack-dep.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash - -. $(dirname "${BASH_SOURCE[0]}")/common.sh -cd ${CURR_DIR}/issue586-subpack-dep -rm -rf a/.dub -rm -rf a/b/.dub -rm -rf main/.dub -${DUB} build --bare --compiler=${DC} main -${DUB} run --bare --compiler=${DC} main diff --git a/test/issue586-subpack-dep/.no_build b/test/issue586-subpack-dep/.no_build deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/issue586-subpack-dep/.no_run b/test/issue586-subpack-dep/.no_run deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/issue586-subpack-dep/.no_test b/test/issue586-subpack-dep/.no_test deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/new_tests/issue586-subpack-dep/.gitignore b/test/new_tests/issue586-subpack-dep/.gitignore new file mode 100644 index 0000000000..00bbbb7672 --- /dev/null +++ b/test/new_tests/issue586-subpack-dep/.gitignore @@ -0,0 +1,10 @@ +/sample/** +!/sample/ +!/sample/dub.json +!/sample/a/ +!/sample/main/ +!/sample/a/b/ +!/sample/**/source/ +!/sample/**/source/**.d +!/sample/**/dub.sdl +!/sample/main/dub.selections.json diff --git a/test/new_tests/issue586-subpack-dep/dub.json b/test/new_tests/issue586-subpack-dep/dub.json new file mode 100644 index 0000000000..466a172199 --- /dev/null +++ b/test/new_tests/issue586-subpack-dep/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue586-subpack-dep", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/issue586-subpack-dep/a/b/dub.sdl b/test/new_tests/issue586-subpack-dep/sample/a/b/dub.sdl similarity index 100% rename from test/issue586-subpack-dep/a/b/dub.sdl rename to test/new_tests/issue586-subpack-dep/sample/a/b/dub.sdl diff --git a/test/issue586-subpack-dep/a/b/source/b.d b/test/new_tests/issue586-subpack-dep/sample/a/b/source/b.d similarity index 100% rename from test/issue586-subpack-dep/a/b/source/b.d rename to test/new_tests/issue586-subpack-dep/sample/a/b/source/b.d diff --git a/test/issue586-subpack-dep/a/dub.sdl b/test/new_tests/issue586-subpack-dep/sample/a/dub.sdl similarity index 100% rename from test/issue586-subpack-dep/a/dub.sdl rename to test/new_tests/issue586-subpack-dep/sample/a/dub.sdl diff --git a/test/issue586-subpack-dep/a/source/a.d b/test/new_tests/issue586-subpack-dep/sample/a/source/a.d similarity index 100% rename from test/issue586-subpack-dep/a/source/a.d rename to test/new_tests/issue586-subpack-dep/sample/a/source/a.d diff --git a/test/issue586-subpack-dep/main/dub.sdl b/test/new_tests/issue586-subpack-dep/sample/main/dub.sdl similarity index 100% rename from test/issue586-subpack-dep/main/dub.sdl rename to test/new_tests/issue586-subpack-dep/sample/main/dub.sdl diff --git a/test/issue586-subpack-dep/main/dub.selections.json b/test/new_tests/issue586-subpack-dep/sample/main/dub.selections.json similarity index 100% rename from test/issue586-subpack-dep/main/dub.selections.json rename to test/new_tests/issue586-subpack-dep/sample/main/dub.selections.json diff --git a/test/issue586-subpack-dep/main/source/c.d b/test/new_tests/issue586-subpack-dep/sample/main/source/c.d similarity index 100% rename from test/issue586-subpack-dep/main/source/c.d rename to test/new_tests/issue586-subpack-dep/sample/main/source/c.d diff --git a/test/new_tests/issue586-subpack-dep/source/app.d b/test/new_tests/issue586-subpack-dep/source/app.d new file mode 100644 index 0000000000..f51e79da83 --- /dev/null +++ b/test/new_tests/issue586-subpack-dep/source/app.d @@ -0,0 +1,19 @@ +import common; + +import std.algorithm; +import std.file; +import std.path; +import std.process; + +void main () { + chdir("sample"); + + foreach (dir; ["a/.dub", "a/b/.dub", "main/.dub"]) + if (exists(dir)) rmdirRecurse(dir); + + if (spawnProcess([dub, "build", "--bare", "main"]).wait != 0) + die("dub build failed"); + + if (spawnProcess([dub, "run", "--bare", "main"]).wait != 0) + die("dub run failed"); +} From e938542fdc4acabbb429da66aaa96a802819c14d Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 26 Jul 2025 10:12:13 +0300 Subject: [PATCH 135/187] issue613-dynlib-pic Signed-off-by: Andrei Horodniceanu --- test/issue613-dynlib-pic.sh | 10 ---------- test/issue613-dynlib-pic/.gitignore | 5 ----- test/issue613-dynlib-pic/.no_build | 0 test/issue613-dynlib-pic/.no_run | 0 test/issue613-dynlib-pic/.no_test | 0 test/issue613-dynlib-pic/source/app.d | 4 ---- test/{ => new_tests}/issue613-dynlib-pic/dub.sdl | 0 test/new_tests/issue613-dynlib-pic/source/app.d | 8 ++++++++ test/new_tests/issue613-dynlib-pic/test.config | 1 + 9 files changed, 9 insertions(+), 19 deletions(-) delete mode 100755 test/issue613-dynlib-pic.sh delete mode 100644 test/issue613-dynlib-pic/.gitignore delete mode 100644 test/issue613-dynlib-pic/.no_build delete mode 100644 test/issue613-dynlib-pic/.no_run delete mode 100644 test/issue613-dynlib-pic/.no_test delete mode 100644 test/issue613-dynlib-pic/source/app.d rename test/{ => new_tests}/issue613-dynlib-pic/dub.sdl (100%) create mode 100644 test/new_tests/issue613-dynlib-pic/source/app.d create mode 100644 test/new_tests/issue613-dynlib-pic/test.config diff --git a/test/issue613-dynlib-pic.sh b/test/issue613-dynlib-pic.sh deleted file mode 100755 index b8fc5e702b..0000000000 --- a/test/issue613-dynlib-pic.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash - -. $(dirname "${BASH_SOURCE[0]}")/common.sh -cd ${CURR_DIR}/issue613-dynlib-pic -rm -rf .dub -if [ "${DC}" = "dmd" ]; then - ${DUB} build --compiler=${DC} -else - echo "Skipping shared library test for ${DC}..." -fi diff --git a/test/issue613-dynlib-pic/.gitignore b/test/issue613-dynlib-pic/.gitignore deleted file mode 100644 index 433d26664a..0000000000 --- a/test/issue613-dynlib-pic/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -.dub -docs.json -__dummy.html -*.o -*.obj diff --git a/test/issue613-dynlib-pic/.no_build b/test/issue613-dynlib-pic/.no_build deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/issue613-dynlib-pic/.no_run b/test/issue613-dynlib-pic/.no_run deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/issue613-dynlib-pic/.no_test b/test/issue613-dynlib-pic/.no_test deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/issue613-dynlib-pic/source/app.d b/test/issue613-dynlib-pic/source/app.d deleted file mode 100644 index 8b92d48301..0000000000 --- a/test/issue613-dynlib-pic/source/app.d +++ /dev/null @@ -1,4 +0,0 @@ -void test() -{ - -} \ No newline at end of file diff --git a/test/issue613-dynlib-pic/dub.sdl b/test/new_tests/issue613-dynlib-pic/dub.sdl similarity index 100% rename from test/issue613-dynlib-pic/dub.sdl rename to test/new_tests/issue613-dynlib-pic/dub.sdl diff --git a/test/new_tests/issue613-dynlib-pic/source/app.d b/test/new_tests/issue613-dynlib-pic/source/app.d new file mode 100644 index 0000000000..a4e9299d6b --- /dev/null +++ b/test/new_tests/issue613-dynlib-pic/source/app.d @@ -0,0 +1,8 @@ +version (Windows) version (DigitalMars) { + import core.sys.windows.dll; + mixin SimpleDllMain; +} +void test() +{ + +} diff --git a/test/new_tests/issue613-dynlib-pic/test.config b/test/new_tests/issue613-dynlib-pic/test.config new file mode 100644 index 0000000000..4c5009d257 --- /dev/null +++ b/test/new_tests/issue613-dynlib-pic/test.config @@ -0,0 +1 @@ +dub_command = build \ No newline at end of file From 4a04d21626774e5dfccfc99a468f52015aa79751 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 26 Jul 2025 10:33:38 +0300 Subject: [PATCH 136/187] issue616-describe-vs-generate-commands Signed-off-by: Andrei Horodniceanu --- .../issue616-describe-vs-generate-commands.sh | 29 ------------ .../.no_build | 1 - test/issue616-subpack/.no_build | 1 - test/issue616-subsubpack/.no_build | 1 - .../.gitignore | 9 ++++ .../dub.json | 8 ++++ .../do-preGenerateCommands.sh | 0 .../dub.json | 0 .../src/dummy.d | 0 .../sample}/issue616-subpack/dub.json | 0 .../sample}/issue616-subpack/src/dummy.d | 0 .../sample}/issue616-subsubpack/dub.json | 0 .../sample}/issue616-subsubpack/src/dummy.d | 0 .../source/app.d | 47 +++++++++++++++++++ 14 files changed, 64 insertions(+), 32 deletions(-) delete mode 100755 test/issue616-describe-vs-generate-commands.sh delete mode 100644 test/issue616-describe-vs-generate-commands/.no_build delete mode 100644 test/issue616-subpack/.no_build delete mode 100644 test/issue616-subsubpack/.no_build create mode 100644 test/new_tests/issue616-describe-vs-generate-commands/.gitignore create mode 100644 test/new_tests/issue616-describe-vs-generate-commands/dub.json rename test/{ => new_tests/issue616-describe-vs-generate-commands/sample}/issue616-describe-vs-generate-commands/do-preGenerateCommands.sh (100%) rename test/{ => new_tests/issue616-describe-vs-generate-commands/sample}/issue616-describe-vs-generate-commands/dub.json (100%) rename test/{ => new_tests/issue616-describe-vs-generate-commands/sample}/issue616-describe-vs-generate-commands/src/dummy.d (100%) rename test/{ => new_tests/issue616-describe-vs-generate-commands/sample}/issue616-subpack/dub.json (100%) rename test/{ => new_tests/issue616-describe-vs-generate-commands/sample}/issue616-subpack/src/dummy.d (100%) rename test/{ => new_tests/issue616-describe-vs-generate-commands/sample}/issue616-subsubpack/dub.json (100%) rename test/{ => new_tests/issue616-describe-vs-generate-commands/sample}/issue616-subsubpack/src/dummy.d (100%) create mode 100644 test/new_tests/issue616-describe-vs-generate-commands/source/app.d diff --git a/test/issue616-describe-vs-generate-commands.sh b/test/issue616-describe-vs-generate-commands.sh deleted file mode 100755 index c8127e53ce..0000000000 --- a/test/issue616-describe-vs-generate-commands.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env bash -. $(dirname "${BASH_SOURCE[0]}")/common.sh - -cd "$CURR_DIR"/issue616-describe-vs-generate-commands - -temp_file=$(mktemp $(basename $0).XXXXXX) - -function cleanup { - rm $temp_file -} - -trap cleanup EXIT - -if ! $DUB describe --compiler=$DC --data-list --data=target-name \ - > "$temp_file" 2>&1; then - die $LINENO 'Printing project data failed!' -fi - -# Create the expected output file to compare stdout against. -expected_file="$CURR_DIR/expected-issue616-output" -echo "preGenerateCommands: DUB_PACKAGES_USED=issue616-describe-vs-generate-commands,issue616-subpack,issue616-subsubpack" > "$expected_file" -echo "$CURR_DIR/issue616-describe-vs-generate-commands/src/" >> "$expected_file" -echo "$CURR_DIR/issue616-subpack/src/" >> "$expected_file" -echo "$CURR_DIR/issue616-subsubpack/src/" >> "$expected_file" -echo "issue616-describe-vs-generate-commands" >> "$expected_file" - -if ! diff "$expected_file" "$temp_file"; then - die $LINENO 'The stdout output did not match the expected output!' -fi diff --git a/test/issue616-describe-vs-generate-commands/.no_build b/test/issue616-describe-vs-generate-commands/.no_build deleted file mode 100644 index 8d1c8b69c3..0000000000 --- a/test/issue616-describe-vs-generate-commands/.no_build +++ /dev/null @@ -1 +0,0 @@ - diff --git a/test/issue616-subpack/.no_build b/test/issue616-subpack/.no_build deleted file mode 100644 index 8d1c8b69c3..0000000000 --- a/test/issue616-subpack/.no_build +++ /dev/null @@ -1 +0,0 @@ - diff --git a/test/issue616-subsubpack/.no_build b/test/issue616-subsubpack/.no_build deleted file mode 100644 index 8d1c8b69c3..0000000000 --- a/test/issue616-subsubpack/.no_build +++ /dev/null @@ -1 +0,0 @@ - diff --git a/test/new_tests/issue616-describe-vs-generate-commands/.gitignore b/test/new_tests/issue616-describe-vs-generate-commands/.gitignore new file mode 100644 index 0000000000..9102d96358 --- /dev/null +++ b/test/new_tests/issue616-describe-vs-generate-commands/.gitignore @@ -0,0 +1,9 @@ +/sample/** +!/sample/ +!/sample/issue616-describe-vs-generate-commands/ +!/sample/issue616-subpack/ +!/sample/issue616-subsubpack/ +!/sample/*/dub.json +!/sample/*/*.sh +!/sample/*/src/ +!/sample/*/src/**.d diff --git a/test/new_tests/issue616-describe-vs-generate-commands/dub.json b/test/new_tests/issue616-describe-vs-generate-commands/dub.json new file mode 100644 index 0000000000..db18220d62 --- /dev/null +++ b/test/new_tests/issue616-describe-vs-generate-commands/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue616-describe-vs-generate-commands", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/issue616-describe-vs-generate-commands/do-preGenerateCommands.sh b/test/new_tests/issue616-describe-vs-generate-commands/sample/issue616-describe-vs-generate-commands/do-preGenerateCommands.sh similarity index 100% rename from test/issue616-describe-vs-generate-commands/do-preGenerateCommands.sh rename to test/new_tests/issue616-describe-vs-generate-commands/sample/issue616-describe-vs-generate-commands/do-preGenerateCommands.sh diff --git a/test/issue616-describe-vs-generate-commands/dub.json b/test/new_tests/issue616-describe-vs-generate-commands/sample/issue616-describe-vs-generate-commands/dub.json similarity index 100% rename from test/issue616-describe-vs-generate-commands/dub.json rename to test/new_tests/issue616-describe-vs-generate-commands/sample/issue616-describe-vs-generate-commands/dub.json diff --git a/test/issue616-describe-vs-generate-commands/src/dummy.d b/test/new_tests/issue616-describe-vs-generate-commands/sample/issue616-describe-vs-generate-commands/src/dummy.d similarity index 100% rename from test/issue616-describe-vs-generate-commands/src/dummy.d rename to test/new_tests/issue616-describe-vs-generate-commands/sample/issue616-describe-vs-generate-commands/src/dummy.d diff --git a/test/issue616-subpack/dub.json b/test/new_tests/issue616-describe-vs-generate-commands/sample/issue616-subpack/dub.json similarity index 100% rename from test/issue616-subpack/dub.json rename to test/new_tests/issue616-describe-vs-generate-commands/sample/issue616-subpack/dub.json diff --git a/test/issue616-subpack/src/dummy.d b/test/new_tests/issue616-describe-vs-generate-commands/sample/issue616-subpack/src/dummy.d similarity index 100% rename from test/issue616-subpack/src/dummy.d rename to test/new_tests/issue616-describe-vs-generate-commands/sample/issue616-subpack/src/dummy.d diff --git a/test/issue616-subsubpack/dub.json b/test/new_tests/issue616-describe-vs-generate-commands/sample/issue616-subsubpack/dub.json similarity index 100% rename from test/issue616-subsubpack/dub.json rename to test/new_tests/issue616-describe-vs-generate-commands/sample/issue616-subsubpack/dub.json diff --git a/test/issue616-subsubpack/src/dummy.d b/test/new_tests/issue616-describe-vs-generate-commands/sample/issue616-subsubpack/src/dummy.d similarity index 100% rename from test/issue616-subsubpack/src/dummy.d rename to test/new_tests/issue616-describe-vs-generate-commands/sample/issue616-subsubpack/src/dummy.d diff --git a/test/new_tests/issue616-describe-vs-generate-commands/source/app.d b/test/new_tests/issue616-describe-vs-generate-commands/source/app.d new file mode 100644 index 0000000000..dde221a091 --- /dev/null +++ b/test/new_tests/issue616-describe-vs-generate-commands/source/app.d @@ -0,0 +1,47 @@ +import common; + +import std.algorithm; +import std.conv; +import std.file; +import std.path; +import std.process; +import std.range; +import std.string; + +void main () { + immutable baseDir = getcwd.buildPath("sample"); + chdir("sample/issue616-describe-vs-generate-commands"); + + auto p = teeProcess([dub, "describe", "--data-list", "--data=target-name"], + Redirect.stdout | Redirect.stderrToStdout); + if (p.wait != 0) + die("dub describe failed"); + const got = p.stdout.splitLines; + + string[] expected; + version(Posix) + expected ~= [ + `preGenerateCommands: DUB_PACKAGES_USED=issue616-describe-vs-generate-commands,issue616-subpack,issue616-subsubpack`, + baseDir.myBuildPath("issue616-describe-vs-generate-commands", "src", ""), + baseDir.myBuildPath("issue616-subpack", "src", ""), + baseDir.myBuildPath("issue616-subsubpack", "src", ""), + ]; + + expected ~= [ `issue616-describe-vs-generate-commands` ]; + + if (equal(got, expected)) return; + + foreach (g, e; lockstep(got, expected)) { + if (g == e) continue; + + log("Expected: ", text([e]), " but got ", text([g])); + } + die("dub describe output differs"); +} + +string myBuildPath(const(char)[][] segments...) { + immutable result = buildPath(segments); + if (segments[$ - 1] == "") + return result ~ dirSeparator; + return result; +} From 154693f1e942561b7d99c0d6acaa4f10ba571df4 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sun, 27 Jul 2025 10:56:27 +0300 Subject: [PATCH 137/187] issue672-upgrade-optional Signed-off-by: Andrei Horodniceanu --- test/issue672-upgrade-optional.sh | 11 --------- test/issue672-upgrade-optional/.no_build | 0 test/issue672-upgrade-optional/dub.sdl | 2 -- .../dub.selections.json | 6 ----- .../issue672-upgrade-optional/.gitignore | 3 +++ .../issue672-upgrade-optional/dub.json | 8 +++++++ .../issue672-upgrade-optional/sample/dub.sdl | 2 ++ .../issue672-upgrade-optional/source/app.d | 23 +++++++++++++++++++ 8 files changed, 36 insertions(+), 19 deletions(-) delete mode 100755 test/issue672-upgrade-optional.sh delete mode 100644 test/issue672-upgrade-optional/.no_build delete mode 100644 test/issue672-upgrade-optional/dub.sdl delete mode 100644 test/issue672-upgrade-optional/dub.selections.json create mode 100644 test/new_tests/issue672-upgrade-optional/.gitignore create mode 100644 test/new_tests/issue672-upgrade-optional/dub.json create mode 100644 test/new_tests/issue672-upgrade-optional/sample/dub.sdl create mode 100644 test/new_tests/issue672-upgrade-optional/source/app.d diff --git a/test/issue672-upgrade-optional.sh b/test/issue672-upgrade-optional.sh deleted file mode 100755 index a8f841c469..0000000000 --- a/test/issue672-upgrade-optional.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bash - -. $(dirname "${BASH_SOURCE[0]}")/common.sh -cd ${CURR_DIR}/issue672-upgrade-optional -rm -rf b/.dub -echo "{\"fileVersion\": 1,\"versions\": {\"dub\": \"1.5.0\"}}" > dub.selections.json -${DUB} upgrade - -if ! grep -c -e "\"dub\": \"1.6.0\"" dub.selections.json; then - die $LINENO 'Dependency not upgraded.' -fi diff --git a/test/issue672-upgrade-optional/.no_build b/test/issue672-upgrade-optional/.no_build deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/issue672-upgrade-optional/dub.sdl b/test/issue672-upgrade-optional/dub.sdl deleted file mode 100644 index 28d82b17e0..0000000000 --- a/test/issue672-upgrade-optional/dub.sdl +++ /dev/null @@ -1,2 +0,0 @@ -name "b" -dependency "dub" version=">=1.5.0 <=1.6.0" optional=true diff --git a/test/issue672-upgrade-optional/dub.selections.json b/test/issue672-upgrade-optional/dub.selections.json deleted file mode 100644 index 099010013c..0000000000 --- a/test/issue672-upgrade-optional/dub.selections.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "fileVersion": 1, - "versions": { - "dub": "1.5.0" - } -} diff --git a/test/new_tests/issue672-upgrade-optional/.gitignore b/test/new_tests/issue672-upgrade-optional/.gitignore new file mode 100644 index 0000000000..3ac140bc44 --- /dev/null +++ b/test/new_tests/issue672-upgrade-optional/.gitignore @@ -0,0 +1,3 @@ +/sample/** +!/sample/ +!/sample/dub.sdl \ No newline at end of file diff --git a/test/new_tests/issue672-upgrade-optional/dub.json b/test/new_tests/issue672-upgrade-optional/dub.json new file mode 100644 index 0000000000..796750c274 --- /dev/null +++ b/test/new_tests/issue672-upgrade-optional/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue672-upgrade-optional", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/new_tests/issue672-upgrade-optional/sample/dub.sdl b/test/new_tests/issue672-upgrade-optional/sample/dub.sdl new file mode 100644 index 0000000000..d132f26f37 --- /dev/null +++ b/test/new_tests/issue672-upgrade-optional/sample/dub.sdl @@ -0,0 +1,2 @@ +name "b" +dependency "dub" version=">=1.5.0 <=1.6.0" optional=true \ No newline at end of file diff --git a/test/new_tests/issue672-upgrade-optional/source/app.d b/test/new_tests/issue672-upgrade-optional/source/app.d new file mode 100644 index 0000000000..3e866c027b --- /dev/null +++ b/test/new_tests/issue672-upgrade-optional/source/app.d @@ -0,0 +1,23 @@ +import common; + +import std.algorithm; +import std.file; +import std.path; +import std.process; + +void main () { + chdir("sample"); + write("dub.selections.json", `{ + "fileVersion": 1, + "versions": { + "dub": "1.5.0", + } +} +`); + + if (spawnProcess([dub, "upgrade"]).wait != 0) + die("dub upgrade failed"); + + if (!readText("dub.selections.json").canFind(`"dub": "1.6.0"`)) + die("Dependency not upgraded"); +} From 009707e8820d188d199bd67b9437fe5be15a96db Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 26 Jul 2025 10:48:49 +0300 Subject: [PATCH 138/187] issue674-concurrent-dub Signed-off-by: Andrei Horodniceanu --- test/issue674-concurrent-dub.sh | 19 ------------- .../issue674-concurrent-dub/dub.json | 8 ++++++ .../issue674-concurrent-dub/source/app.d | 28 +++++++++++++++++++ 3 files changed, 36 insertions(+), 19 deletions(-) delete mode 100755 test/issue674-concurrent-dub.sh create mode 100644 test/new_tests/issue674-concurrent-dub/dub.json create mode 100644 test/new_tests/issue674-concurrent-dub/source/app.d diff --git a/test/issue674-concurrent-dub.sh b/test/issue674-concurrent-dub.sh deleted file mode 100755 index 8f59ab73a6..0000000000 --- a/test/issue674-concurrent-dub.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env bash - -. $(dirname "${BASH_SOURCE[0]}")/common.sh - -TMPDIR=$(mktemp -d $(basename $0).XXXXXX) - -function cleanup { - rm -rf ${TMPDIR} -} -trap cleanup EXIT - -cd ${TMPDIR} && $DUB fetch --cache=local bloom & -pid1=$! -sleep 0.5 -cd ${TMPDIR} && $DUB fetch --cache=local bloom & -pid2=$! -wait $pid1 -wait $pid2 -[ -d ${TMPDIR}/.dub/packages/bloom* ] \ No newline at end of file diff --git a/test/new_tests/issue674-concurrent-dub/dub.json b/test/new_tests/issue674-concurrent-dub/dub.json new file mode 100644 index 0000000000..1b4b9968ad --- /dev/null +++ b/test/new_tests/issue674-concurrent-dub/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue674-concurrent-dub", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/new_tests/issue674-concurrent-dub/source/app.d b/test/new_tests/issue674-concurrent-dub/source/app.d new file mode 100644 index 0000000000..91c3b56edf --- /dev/null +++ b/test/new_tests/issue674-concurrent-dub/source/app.d @@ -0,0 +1,28 @@ +import common; + +import std.algorithm; +import std.file; +import std.path; +import std.process; +import core.thread.osthread; +import core.time; + + +void main () { + immutable dub = environment["DUB"]; + + if (exists("test")) rmdirRecurse("test"); + mkdir("test"); + chdir("test"); + + immutable cmd = [dub, "fetch", "--cache=local", "bloom"]; + auto p1 = spawnProcess(cmd); + Thread.sleep(500.msecs); + auto p2 = spawnProcess(cmd); + + wait(p1); + wait(p2); + + if (!exists(".dub/packages/bloom")) + die("test/.dub/packages/bloom has not been created"); +} From 7ae91754e1234bb450385ffcafc9232d6a9b8d0c Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 26 Jul 2025 12:19:58 +0300 Subject: [PATCH 139/187] issue686-multiple-march Signed-off-by: Andrei Horodniceanu --- test/issue686-multiple-march.sh | 5 ----- test/issue686-multiple-march/.no_build | 0 test/issue686-multiple-march/.no_run | 0 test/issue686-multiple-march/.no_test | 0 .../issue686-multiple-march/.gitignore | 8 +++++++ .../issue686-multiple-march/dub.json | 8 +++++++ .../sample}/a/dub.json | 2 +- .../sample}/a/source/a.d | 0 .../sample}/b/dub.json | 2 +- .../sample}/b/source/b.d | 0 .../sample}/main/dub.json | 2 +- .../sample}/main/source/main.d | 0 .../issue686-multiple-march/source/app.d | 21 +++++++++++++++++++ 13 files changed, 40 insertions(+), 8 deletions(-) delete mode 100755 test/issue686-multiple-march.sh delete mode 100644 test/issue686-multiple-march/.no_build delete mode 100644 test/issue686-multiple-march/.no_run delete mode 100644 test/issue686-multiple-march/.no_test create mode 100644 test/new_tests/issue686-multiple-march/.gitignore create mode 100644 test/new_tests/issue686-multiple-march/dub.json rename test/{issue686-multiple-march => new_tests/issue686-multiple-march/sample}/a/dub.json (96%) rename test/{issue686-multiple-march => new_tests/issue686-multiple-march/sample}/a/source/a.d (100%) rename test/{issue686-multiple-march => new_tests/issue686-multiple-march/sample}/b/dub.json (88%) rename test/{issue686-multiple-march => new_tests/issue686-multiple-march/sample}/b/source/b.d (100%) rename test/{issue686-multiple-march => new_tests/issue686-multiple-march/sample}/main/dub.json (97%) rename test/{issue686-multiple-march => new_tests/issue686-multiple-march/sample}/main/source/main.d (100%) create mode 100644 test/new_tests/issue686-multiple-march/source/app.d diff --git a/test/issue686-multiple-march.sh b/test/issue686-multiple-march.sh deleted file mode 100755 index 24b84b74a0..0000000000 --- a/test/issue686-multiple-march.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash - -. $(dirname "${BASH_SOURCE[0]}")/common.sh -cd ${CURR_DIR}/issue686-multiple-march -${DUB} build --bare --force --compiler=${DC} -a x86_64 -v main 2>&1 | { ! grep -e '-m64 -m64' -c; } diff --git a/test/issue686-multiple-march/.no_build b/test/issue686-multiple-march/.no_build deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/issue686-multiple-march/.no_run b/test/issue686-multiple-march/.no_run deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/issue686-multiple-march/.no_test b/test/issue686-multiple-march/.no_test deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/new_tests/issue686-multiple-march/.gitignore b/test/new_tests/issue686-multiple-march/.gitignore new file mode 100644 index 0000000000..f9686eb9e4 --- /dev/null +++ b/test/new_tests/issue686-multiple-march/.gitignore @@ -0,0 +1,8 @@ +/sample/** +!/sample/ +!/sample/a +!/sample/b +!/sample/main +!/sample/*/dub.json +!/sample/*/source/ +!/sample/*/source/**.d \ No newline at end of file diff --git a/test/new_tests/issue686-multiple-march/dub.json b/test/new_tests/issue686-multiple-march/dub.json new file mode 100644 index 0000000000..0e7939934d --- /dev/null +++ b/test/new_tests/issue686-multiple-march/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue686-multiple-march", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/issue686-multiple-march/a/dub.json b/test/new_tests/issue686-multiple-march/sample/a/dub.json similarity index 96% rename from test/issue686-multiple-march/a/dub.json rename to test/new_tests/issue686-multiple-march/sample/a/dub.json index 341d1269bf..f277a21632 100644 --- a/test/issue686-multiple-march/a/dub.json +++ b/test/new_tests/issue686-multiple-march/sample/a/dub.json @@ -3,4 +3,4 @@ "dependencies": { "b": {"path": "../b"} } -} \ No newline at end of file +} diff --git a/test/issue686-multiple-march/a/source/a.d b/test/new_tests/issue686-multiple-march/sample/a/source/a.d similarity index 100% rename from test/issue686-multiple-march/a/source/a.d rename to test/new_tests/issue686-multiple-march/sample/a/source/a.d diff --git a/test/issue686-multiple-march/b/dub.json b/test/new_tests/issue686-multiple-march/sample/b/dub.json similarity index 88% rename from test/issue686-multiple-march/b/dub.json rename to test/new_tests/issue686-multiple-march/sample/b/dub.json index 2824d72989..2697a7f0fc 100644 --- a/test/issue686-multiple-march/b/dub.json +++ b/test/new_tests/issue686-multiple-march/sample/b/dub.json @@ -1,3 +1,3 @@ { "name": "b" -} \ No newline at end of file +} diff --git a/test/issue686-multiple-march/b/source/b.d b/test/new_tests/issue686-multiple-march/sample/b/source/b.d similarity index 100% rename from test/issue686-multiple-march/b/source/b.d rename to test/new_tests/issue686-multiple-march/sample/b/source/b.d diff --git a/test/issue686-multiple-march/main/dub.json b/test/new_tests/issue686-multiple-march/sample/main/dub.json similarity index 97% rename from test/issue686-multiple-march/main/dub.json rename to test/new_tests/issue686-multiple-march/sample/main/dub.json index 0160e794aa..8c72d54f37 100644 --- a/test/issue686-multiple-march/main/dub.json +++ b/test/new_tests/issue686-multiple-march/sample/main/dub.json @@ -4,4 +4,4 @@ "a": {"path": "../a"}, "b": {"path": "../b"} } -} \ No newline at end of file +} diff --git a/test/issue686-multiple-march/main/source/main.d b/test/new_tests/issue686-multiple-march/sample/main/source/main.d similarity index 100% rename from test/issue686-multiple-march/main/source/main.d rename to test/new_tests/issue686-multiple-march/sample/main/source/main.d diff --git a/test/new_tests/issue686-multiple-march/source/app.d b/test/new_tests/issue686-multiple-march/source/app.d new file mode 100644 index 0000000000..22f50cbf32 --- /dev/null +++ b/test/new_tests/issue686-multiple-march/source/app.d @@ -0,0 +1,21 @@ +import common; + +import std.algorithm; +import std.file; +import std.path; +import std.process; +import std.stdio; + +void main () { + auto p = teeProcess( + [dub, "build", "--bare", "--force", "-a", "x86_64", "-v", "main"], + Redirect.stdout | Redirect.stderrToStdout, + null, + Config.none, + "sample", + ); + if (p.wait != 0) + die("dub build failed"); + if (p.stdout.canFind("-m64 -m64")) + die("-m64 appeared twice in output"); +} From 02b478b3aceb49e06912b4d5ecab19c13699ef66 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 26 Jul 2025 12:23:21 +0300 Subject: [PATCH 140/187] issue754-path-selection-fail Signed-off-by: Andrei Horodniceanu --- test/issue754-path-selection-fail/a-1.0/dub.sdl | 2 -- test/issue754-path-selection-fail/a-2.0/dub.sdl | 3 --- test/issue754-path-selection-fail/dub.sdl | 2 -- test/new_tests/issue754-path-selection-fail/.gitignore | 5 +++++ test/new_tests/issue754-path-selection-fail/a-1.0/dub.sdl | 2 ++ .../issue754-path-selection-fail/a-1.0/source/a.d | 0 test/new_tests/issue754-path-selection-fail/a-2.0/dub.sdl | 3 +++ test/new_tests/issue754-path-selection-fail/dub.sdl | 2 ++ .../issue754-path-selection-fail/dub.selections.json | 2 +- .../issue754-path-selection-fail/source/app.d | 0 10 files changed, 13 insertions(+), 8 deletions(-) delete mode 100644 test/issue754-path-selection-fail/a-1.0/dub.sdl delete mode 100644 test/issue754-path-selection-fail/a-2.0/dub.sdl delete mode 100644 test/issue754-path-selection-fail/dub.sdl create mode 100644 test/new_tests/issue754-path-selection-fail/.gitignore create mode 100644 test/new_tests/issue754-path-selection-fail/a-1.0/dub.sdl rename test/{ => new_tests}/issue754-path-selection-fail/a-1.0/source/a.d (100%) create mode 100644 test/new_tests/issue754-path-selection-fail/a-2.0/dub.sdl create mode 100644 test/new_tests/issue754-path-selection-fail/dub.sdl rename test/{ => new_tests}/issue754-path-selection-fail/dub.selections.json (54%) rename test/{ => new_tests}/issue754-path-selection-fail/source/app.d (100%) diff --git a/test/issue754-path-selection-fail/a-1.0/dub.sdl b/test/issue754-path-selection-fail/a-1.0/dub.sdl deleted file mode 100644 index 7ff9fa17ef..0000000000 --- a/test/issue754-path-selection-fail/a-1.0/dub.sdl +++ /dev/null @@ -1,2 +0,0 @@ -name "a" -version "1.0.0" diff --git a/test/issue754-path-selection-fail/a-2.0/dub.sdl b/test/issue754-path-selection-fail/a-2.0/dub.sdl deleted file mode 100644 index 1cb3694109..0000000000 --- a/test/issue754-path-selection-fail/a-2.0/dub.sdl +++ /dev/null @@ -1,3 +0,0 @@ -name "a" -version "2.0.0" - diff --git a/test/issue754-path-selection-fail/dub.sdl b/test/issue754-path-selection-fail/dub.sdl deleted file mode 100644 index b36515c259..0000000000 --- a/test/issue754-path-selection-fail/dub.sdl +++ /dev/null @@ -1,2 +0,0 @@ -name "test" -dependency "a" path="a-2.0" diff --git a/test/new_tests/issue754-path-selection-fail/.gitignore b/test/new_tests/issue754-path-selection-fail/.gitignore new file mode 100644 index 0000000000..9a42dce86e --- /dev/null +++ b/test/new_tests/issue754-path-selection-fail/.gitignore @@ -0,0 +1,5 @@ +!/dub.selections.json +!/a-*/ +!/a-*/dub.sdl +!/a-*/source/ +!/a-*/source/**.d \ No newline at end of file diff --git a/test/new_tests/issue754-path-selection-fail/a-1.0/dub.sdl b/test/new_tests/issue754-path-selection-fail/a-1.0/dub.sdl new file mode 100644 index 0000000000..aaa02a9850 --- /dev/null +++ b/test/new_tests/issue754-path-selection-fail/a-1.0/dub.sdl @@ -0,0 +1,2 @@ +name "issue754-a" +version "1.0.0" diff --git a/test/issue754-path-selection-fail/a-1.0/source/a.d b/test/new_tests/issue754-path-selection-fail/a-1.0/source/a.d similarity index 100% rename from test/issue754-path-selection-fail/a-1.0/source/a.d rename to test/new_tests/issue754-path-selection-fail/a-1.0/source/a.d diff --git a/test/new_tests/issue754-path-selection-fail/a-2.0/dub.sdl b/test/new_tests/issue754-path-selection-fail/a-2.0/dub.sdl new file mode 100644 index 0000000000..d975a3379f --- /dev/null +++ b/test/new_tests/issue754-path-selection-fail/a-2.0/dub.sdl @@ -0,0 +1,3 @@ +name "issue754-a" +version "2.0.0" + diff --git a/test/new_tests/issue754-path-selection-fail/dub.sdl b/test/new_tests/issue754-path-selection-fail/dub.sdl new file mode 100644 index 0000000000..5a67b99b2d --- /dev/null +++ b/test/new_tests/issue754-path-selection-fail/dub.sdl @@ -0,0 +1,2 @@ +name "issue754-test" +dependency "issue754-a" path="a-2.0" diff --git a/test/issue754-path-selection-fail/dub.selections.json b/test/new_tests/issue754-path-selection-fail/dub.selections.json similarity index 54% rename from test/issue754-path-selection-fail/dub.selections.json rename to test/new_tests/issue754-path-selection-fail/dub.selections.json index 61e9539512..234f1cb42e 100644 --- a/test/issue754-path-selection-fail/dub.selections.json +++ b/test/new_tests/issue754-path-selection-fail/dub.selections.json @@ -1,6 +1,6 @@ { "fileVersion": 1, "versions": { - "a": {"path": "a-1.0"} + "issue754-a": {"path": "a-1.0"} } } diff --git a/test/issue754-path-selection-fail/source/app.d b/test/new_tests/issue754-path-selection-fail/source/app.d similarity index 100% rename from test/issue754-path-selection-fail/source/app.d rename to test/new_tests/issue754-path-selection-fail/source/app.d From 2d33039f01124d01e8599c7710d7ccafe06e507d Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 26 Jul 2025 12:27:04 +0300 Subject: [PATCH 141/187] issue777-bogus-path-dependency Signed-off-by: Andrei Horodniceanu --- test/issue777-bogus-path-dependency/b/dub.sdl | 10 ---------- test/issue777-bogus-path-dependency/c-err/dub.sdl | 1 - test/issue777-bogus-path-dependency/c/dub.sdl | 1 - test/issue777-bogus-path-dependency/dub.sdl | 2 -- .../issue777-bogus-path-dependency/dub.selections.json | 7 ------- .../issue777-bogus-path-dependency/.gitignore | 7 +++++++ .../issue777-bogus-path-dependency/b/a.d | 0 .../new_tests/issue777-bogus-path-dependency/b/dub.sdl | 10 ++++++++++ .../issue777-bogus-path-dependency/c-err/dub.sdl | 1 + .../issue777-bogus-path-dependency/c-err/source/lib.d | 0 .../new_tests/issue777-bogus-path-dependency/c/dub.sdl | 1 + .../issue777-bogus-path-dependency/c/source/lib.d | 0 test/new_tests/issue777-bogus-path-dependency/dub.sdl | 2 ++ .../issue777-bogus-path-dependency/dub.selections.json | 7 +++++++ .../issue777-bogus-path-dependency/source/app.d | 0 15 files changed, 28 insertions(+), 21 deletions(-) delete mode 100644 test/issue777-bogus-path-dependency/b/dub.sdl delete mode 100644 test/issue777-bogus-path-dependency/c-err/dub.sdl delete mode 100644 test/issue777-bogus-path-dependency/c/dub.sdl delete mode 100644 test/issue777-bogus-path-dependency/dub.sdl delete mode 100644 test/issue777-bogus-path-dependency/dub.selections.json create mode 100644 test/new_tests/issue777-bogus-path-dependency/.gitignore rename test/{ => new_tests}/issue777-bogus-path-dependency/b/a.d (100%) create mode 100644 test/new_tests/issue777-bogus-path-dependency/b/dub.sdl create mode 100644 test/new_tests/issue777-bogus-path-dependency/c-err/dub.sdl rename test/{ => new_tests}/issue777-bogus-path-dependency/c-err/source/lib.d (100%) create mode 100644 test/new_tests/issue777-bogus-path-dependency/c/dub.sdl rename test/{ => new_tests}/issue777-bogus-path-dependency/c/source/lib.d (100%) create mode 100644 test/new_tests/issue777-bogus-path-dependency/dub.sdl create mode 100644 test/new_tests/issue777-bogus-path-dependency/dub.selections.json rename test/{ => new_tests}/issue777-bogus-path-dependency/source/app.d (100%) diff --git a/test/issue777-bogus-path-dependency/b/dub.sdl b/test/issue777-bogus-path-dependency/b/dub.sdl deleted file mode 100644 index 7aff103f3d..0000000000 --- a/test/issue777-bogus-path-dependency/b/dub.sdl +++ /dev/null @@ -1,10 +0,0 @@ -name "b" -targetType "none" - -configuration "a" { - dependency "c" version="*" -} - -configuration "b" { - dependency "c" path="../c-err" -} diff --git a/test/issue777-bogus-path-dependency/c-err/dub.sdl b/test/issue777-bogus-path-dependency/c-err/dub.sdl deleted file mode 100644 index 1ed791a15b..0000000000 --- a/test/issue777-bogus-path-dependency/c-err/dub.sdl +++ /dev/null @@ -1 +0,0 @@ -name "c" diff --git a/test/issue777-bogus-path-dependency/c/dub.sdl b/test/issue777-bogus-path-dependency/c/dub.sdl deleted file mode 100644 index 1ed791a15b..0000000000 --- a/test/issue777-bogus-path-dependency/c/dub.sdl +++ /dev/null @@ -1 +0,0 @@ -name "c" diff --git a/test/issue777-bogus-path-dependency/dub.sdl b/test/issue777-bogus-path-dependency/dub.sdl deleted file mode 100644 index 441587cc94..0000000000 --- a/test/issue777-bogus-path-dependency/dub.sdl +++ /dev/null @@ -1,2 +0,0 @@ -name "test" -dependency "b" path="b" diff --git a/test/issue777-bogus-path-dependency/dub.selections.json b/test/issue777-bogus-path-dependency/dub.selections.json deleted file mode 100644 index a446d1f23f..0000000000 --- a/test/issue777-bogus-path-dependency/dub.selections.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "fileVersion": 1, - "versions": { - "b": {"path":"b"}, - "c": {"path":"c"} - } -} diff --git a/test/new_tests/issue777-bogus-path-dependency/.gitignore b/test/new_tests/issue777-bogus-path-dependency/.gitignore new file mode 100644 index 0000000000..ffae721d5f --- /dev/null +++ b/test/new_tests/issue777-bogus-path-dependency/.gitignore @@ -0,0 +1,7 @@ +!/dub.selections.json +!/b/ +!/c/ +!/c-err/ +!/*/dub.sdl +!/*/source/ +!/*/source/**.d \ No newline at end of file diff --git a/test/issue777-bogus-path-dependency/b/a.d b/test/new_tests/issue777-bogus-path-dependency/b/a.d similarity index 100% rename from test/issue777-bogus-path-dependency/b/a.d rename to test/new_tests/issue777-bogus-path-dependency/b/a.d diff --git a/test/new_tests/issue777-bogus-path-dependency/b/dub.sdl b/test/new_tests/issue777-bogus-path-dependency/b/dub.sdl new file mode 100644 index 0000000000..89b9d49ccf --- /dev/null +++ b/test/new_tests/issue777-bogus-path-dependency/b/dub.sdl @@ -0,0 +1,10 @@ +name "issue777-b" +targetType "none" + +configuration "a" { + dependency "issue777-c" version="*" +} + +configuration "b" { + dependency "issue777-c" path="../c-err" +} diff --git a/test/new_tests/issue777-bogus-path-dependency/c-err/dub.sdl b/test/new_tests/issue777-bogus-path-dependency/c-err/dub.sdl new file mode 100644 index 0000000000..23bdb34d45 --- /dev/null +++ b/test/new_tests/issue777-bogus-path-dependency/c-err/dub.sdl @@ -0,0 +1 @@ +name "issue777-c" diff --git a/test/issue777-bogus-path-dependency/c-err/source/lib.d b/test/new_tests/issue777-bogus-path-dependency/c-err/source/lib.d similarity index 100% rename from test/issue777-bogus-path-dependency/c-err/source/lib.d rename to test/new_tests/issue777-bogus-path-dependency/c-err/source/lib.d diff --git a/test/new_tests/issue777-bogus-path-dependency/c/dub.sdl b/test/new_tests/issue777-bogus-path-dependency/c/dub.sdl new file mode 100644 index 0000000000..23bdb34d45 --- /dev/null +++ b/test/new_tests/issue777-bogus-path-dependency/c/dub.sdl @@ -0,0 +1 @@ +name "issue777-c" diff --git a/test/issue777-bogus-path-dependency/c/source/lib.d b/test/new_tests/issue777-bogus-path-dependency/c/source/lib.d similarity index 100% rename from test/issue777-bogus-path-dependency/c/source/lib.d rename to test/new_tests/issue777-bogus-path-dependency/c/source/lib.d diff --git a/test/new_tests/issue777-bogus-path-dependency/dub.sdl b/test/new_tests/issue777-bogus-path-dependency/dub.sdl new file mode 100644 index 0000000000..84781646cd --- /dev/null +++ b/test/new_tests/issue777-bogus-path-dependency/dub.sdl @@ -0,0 +1,2 @@ +name "issue777-test" +dependency "issue777-b" path="b" diff --git a/test/new_tests/issue777-bogus-path-dependency/dub.selections.json b/test/new_tests/issue777-bogus-path-dependency/dub.selections.json new file mode 100644 index 0000000000..acd8f7efeb --- /dev/null +++ b/test/new_tests/issue777-bogus-path-dependency/dub.selections.json @@ -0,0 +1,7 @@ +{ + "fileVersion": 1, + "versions": { + "issue777-b": {"path":"b"}, + "issue777-c": {"path":"c"} + } +} diff --git a/test/issue777-bogus-path-dependency/source/app.d b/test/new_tests/issue777-bogus-path-dependency/source/app.d similarity index 100% rename from test/issue777-bogus-path-dependency/source/app.d rename to test/new_tests/issue777-bogus-path-dependency/source/app.d From 708c45892b8abffb8df92440f6663ddeacf8553f Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 26 Jul 2025 12:42:18 +0300 Subject: [PATCH 142/187] issue782-gtkd-pkg-config Use -ldl for linking against libdl as opossed to forcefully trying to use the .so which is not available os musl systems Signed-off-by: Andrei Horodniceanu --- test/issue782-gtkd-pkg-config.sh | 31 ----------------- test/issue782-gtkd-pkg-config.sh.min_frontend | 1 - test/issue782-gtkd-pkg-config/.no_build | 0 test/issue782-gtkd-pkg-config/.no_run | 0 test/issue782-gtkd-pkg-config/.no_test | 0 .../issue782-gtkd-pkg-config/.gitignore | 10 ++++++ .../issue782-gtkd-pkg-config/dub.json | 8 +++++ .../sample}/fake-gtkd/dub.json | 0 .../sample}/fake-gtkd/pkgconfig/fake-gtkd.pc | 2 +- .../sample}/fake-gtkd/src/fakegtkd.d | 0 .../sample}/fake-gtkd/src/lib.d | 0 .../sample}/main/dub.json | 0 .../sample}/main/src/app.d | 0 .../issue782-gtkd-pkg-config/source/app.d | 33 +++++++++++++++++++ .../issue782-gtkd-pkg-config/test.config | 3 ++ 15 files changed, 55 insertions(+), 33 deletions(-) delete mode 100755 test/issue782-gtkd-pkg-config.sh delete mode 100644 test/issue782-gtkd-pkg-config.sh.min_frontend delete mode 100644 test/issue782-gtkd-pkg-config/.no_build delete mode 100644 test/issue782-gtkd-pkg-config/.no_run delete mode 100644 test/issue782-gtkd-pkg-config/.no_test create mode 100644 test/new_tests/issue782-gtkd-pkg-config/.gitignore create mode 100644 test/new_tests/issue782-gtkd-pkg-config/dub.json rename test/{issue782-gtkd-pkg-config => new_tests/issue782-gtkd-pkg-config/sample}/fake-gtkd/dub.json (100%) rename test/{issue782-gtkd-pkg-config => new_tests/issue782-gtkd-pkg-config/sample}/fake-gtkd/pkgconfig/fake-gtkd.pc (77%) rename test/{issue782-gtkd-pkg-config => new_tests/issue782-gtkd-pkg-config/sample}/fake-gtkd/src/fakegtkd.d (100%) rename test/{issue782-gtkd-pkg-config => new_tests/issue782-gtkd-pkg-config/sample}/fake-gtkd/src/lib.d (100%) rename test/{issue782-gtkd-pkg-config => new_tests/issue782-gtkd-pkg-config/sample}/main/dub.json (100%) rename test/{issue782-gtkd-pkg-config => new_tests/issue782-gtkd-pkg-config/sample}/main/src/app.d (100%) create mode 100644 test/new_tests/issue782-gtkd-pkg-config/source/app.d create mode 100644 test/new_tests/issue782-gtkd-pkg-config/test.config diff --git a/test/issue782-gtkd-pkg-config.sh b/test/issue782-gtkd-pkg-config.sh deleted file mode 100755 index 4b014ca4aa..0000000000 --- a/test/issue782-gtkd-pkg-config.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env bash - -. $(dirname "${BASH_SOURCE[0]}")/common.sh - -if [ $(uname) != "Linux" ]; then - echo "Skipping issue782-dtkd-pkg-config test on non-Linux platform..." -elif [ "${DC}" != "dmd" ]; then - echo "Skipping issue782-dtkd-pkg-config test for ${DC}..." -else - echo ${CURR_DIR-$(pwd)} - # the ${CURR_DIR-$(pwd)} allows running issue782-gtkd-pkg-config.sh stand-alone from the test directory - cd ${CURR_DIR-$(pwd)}/issue782-gtkd-pkg-config - rm -rf fake-gtkd/.dub - rm -f fake-gtkd/libfake-gtkd.so - rm -rf main/.dub - rm -f main/fake-gtkd-test - echo ${DUB} - cd fake-gtkd && ${DUB} build --compiler=${DC} - cd ../main - - # `run` needs to find the fake-gtkd shared library, so set LD_LIBRARY_PATH to where it is - export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:-}${LD_LIBRARY_PATH:+:}$PWD/../fake-gtkd - # pkg-config needs to find our .pc file which is in $PWD/../fake-gtkd/pkgconfig, so set PKG_CONFIG_PATH accordingly - export PKG_CONFIG_PATH=$PWD/../fake-gtkd/pkgconfig - ${DUB} run --force --compiler=${DC} - cd .. - rm -rf fake-gtkd/.dub - rm fake-gtkd/libfake-gtkd.so - rm -rf main/.dub - rm main/fake-gtkd-test -fi diff --git a/test/issue782-gtkd-pkg-config.sh.min_frontend b/test/issue782-gtkd-pkg-config.sh.min_frontend deleted file mode 100644 index a7ad183ce7..0000000000 --- a/test/issue782-gtkd-pkg-config.sh.min_frontend +++ /dev/null @@ -1 +0,0 @@ -2.068 \ No newline at end of file diff --git a/test/issue782-gtkd-pkg-config/.no_build b/test/issue782-gtkd-pkg-config/.no_build deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/issue782-gtkd-pkg-config/.no_run b/test/issue782-gtkd-pkg-config/.no_run deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/issue782-gtkd-pkg-config/.no_test b/test/issue782-gtkd-pkg-config/.no_test deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/new_tests/issue782-gtkd-pkg-config/.gitignore b/test/new_tests/issue782-gtkd-pkg-config/.gitignore new file mode 100644 index 0000000000..6e1ddc97c9 --- /dev/null +++ b/test/new_tests/issue782-gtkd-pkg-config/.gitignore @@ -0,0 +1,10 @@ +/sample/** +!/sample/ +!/sample/main/ +!/sample/fake-gtkd/ +!/sample/*/dub.json +!/sample/*/src/ +!/sample/*/src/**.d + +!/sample/fake-gtkd/pkgconfig +!/sample/fake-gtkd/pkgconfig/fake-gtkd.pc diff --git a/test/new_tests/issue782-gtkd-pkg-config/dub.json b/test/new_tests/issue782-gtkd-pkg-config/dub.json new file mode 100644 index 0000000000..f283412daf --- /dev/null +++ b/test/new_tests/issue782-gtkd-pkg-config/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue782-gtkd-pkg-config", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/issue782-gtkd-pkg-config/fake-gtkd/dub.json b/test/new_tests/issue782-gtkd-pkg-config/sample/fake-gtkd/dub.json similarity index 100% rename from test/issue782-gtkd-pkg-config/fake-gtkd/dub.json rename to test/new_tests/issue782-gtkd-pkg-config/sample/fake-gtkd/dub.json diff --git a/test/issue782-gtkd-pkg-config/fake-gtkd/pkgconfig/fake-gtkd.pc b/test/new_tests/issue782-gtkd-pkg-config/sample/fake-gtkd/pkgconfig/fake-gtkd.pc similarity index 77% rename from test/issue782-gtkd-pkg-config/fake-gtkd/pkgconfig/fake-gtkd.pc rename to test/new_tests/issue782-gtkd-pkg-config/sample/fake-gtkd/pkgconfig/fake-gtkd.pc index 654ac32859..941ab59c7f 100644 --- a/test/issue782-gtkd-pkg-config/fake-gtkd/pkgconfig/fake-gtkd.pc +++ b/test/new_tests/issue782-gtkd-pkg-config/sample/fake-gtkd/pkgconfig/fake-gtkd.pc @@ -8,5 +8,5 @@ Version: 1.0.0 #Requires: phobos2 # The "-L-defaultlib=libphobos2.so" and "-defaultlib=libphobos2.so" should both end up on the compiler (at link stage) invocation as "-defaultlib=libphobos2.so" # For this test, it doesn't hurt that they appear twice on the cmd line... -Libs: -L-L${libdir} -L-l:libfake-gtkd.so -L-l:libdl.so.2 -pthread -L-defaultlib=libphobos2.so -defaultlib=libphobos2.so +Libs: -L-L${libdir} -L-l:libfake-gtkd.so -L-ldl -pthread -L-defaultlib=libphobos2.so -defaultlib=libphobos2.so Cflags: -I${includedir} diff --git a/test/issue782-gtkd-pkg-config/fake-gtkd/src/fakegtkd.d b/test/new_tests/issue782-gtkd-pkg-config/sample/fake-gtkd/src/fakegtkd.d similarity index 100% rename from test/issue782-gtkd-pkg-config/fake-gtkd/src/fakegtkd.d rename to test/new_tests/issue782-gtkd-pkg-config/sample/fake-gtkd/src/fakegtkd.d diff --git a/test/issue782-gtkd-pkg-config/fake-gtkd/src/lib.d b/test/new_tests/issue782-gtkd-pkg-config/sample/fake-gtkd/src/lib.d similarity index 100% rename from test/issue782-gtkd-pkg-config/fake-gtkd/src/lib.d rename to test/new_tests/issue782-gtkd-pkg-config/sample/fake-gtkd/src/lib.d diff --git a/test/issue782-gtkd-pkg-config/main/dub.json b/test/new_tests/issue782-gtkd-pkg-config/sample/main/dub.json similarity index 100% rename from test/issue782-gtkd-pkg-config/main/dub.json rename to test/new_tests/issue782-gtkd-pkg-config/sample/main/dub.json diff --git a/test/issue782-gtkd-pkg-config/main/src/app.d b/test/new_tests/issue782-gtkd-pkg-config/sample/main/src/app.d similarity index 100% rename from test/issue782-gtkd-pkg-config/main/src/app.d rename to test/new_tests/issue782-gtkd-pkg-config/sample/main/src/app.d diff --git a/test/new_tests/issue782-gtkd-pkg-config/source/app.d b/test/new_tests/issue782-gtkd-pkg-config/source/app.d new file mode 100644 index 0000000000..ed3698a38c --- /dev/null +++ b/test/new_tests/issue782-gtkd-pkg-config/source/app.d @@ -0,0 +1,33 @@ +import common; + +import std.algorithm; +import std.file; +import std.path; +import std.process; + +void main () { + chdir("sample"); + + foreach (dir; ["fake-gtkd/.dub", "main/.dub"]) + if (exists(dir)) rmdirRecurse(dir); + foreach (file; ["fake-gtkd/libfake-gtkd.so", "main/fake-gtkd-test"]) + if (exists(file)) remove(file); + if (spawnProcess([dub, "build"], null, Config.none, "fake-gtkd").wait != 0) + die("dub build fake-gtkd failed"); + + immutable ldPath = environment.get("LD_LIBRARY_PATH"); + immutable gtkdPath = getcwd.buildPath("fake-gtkd"); + immutable newLdPath = ldPath.length ? ldPath ~ ":" ~ gtkdPath : gtkdPath; + immutable pkgConfigPath = gtkdPath.buildPath("pkgconfig"); + + auto p = spawnProcess( + [dub, "-v", "run", "--force"], + [ "LD_LIBRARY_PATH": newLdPath, + "PKG_CONFIG_PATH": pkgConfigPath, + ], + Config.none, + "main", + ); + if (p.wait != 0) + die("dub run main failed"); +} diff --git a/test/new_tests/issue782-gtkd-pkg-config/test.config b/test/new_tests/issue782-gtkd-pkg-config/test.config new file mode 100644 index 0000000000..6d2e671548 --- /dev/null +++ b/test/new_tests/issue782-gtkd-pkg-config/test.config @@ -0,0 +1,3 @@ +os = linux +# hardcoded -defaultlib=libphobos2.so +dc_backend = dmd \ No newline at end of file From 1b80958c7f4087191dccace731c5a4921192ef30 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 26 Jul 2025 12:48:44 +0300 Subject: [PATCH 143/187] issue813-fixed-dependency Signed-off-by: Andrei Horodniceanu --- test/issue813-fixed-dependency.sh | 8 -------- test/issue813-fixed-dependency/.no_build | 1 - test/new_tests/issue813-fixed-dependency/.gitignore | 10 ++++++++++ test/new_tests/issue813-fixed-dependency/dub.json | 8 ++++++++ .../issue813-fixed-dependency/sample}/main/dub.sdl | 0 .../sample}/main/dub.selections.json | 0 .../sample}/main/src/app.d | 0 .../issue813-fixed-dependency/sample}/sub/dub.sdl | 0 .../sample}/sub/sub/dub.sdl | 0 .../sample}/sub/sub/src/sub/test.d | 0 .../issue813-fixed-dependency/source/app.d | 13 +++++++++++++ 11 files changed, 31 insertions(+), 9 deletions(-) delete mode 100755 test/issue813-fixed-dependency.sh delete mode 100644 test/issue813-fixed-dependency/.no_build create mode 100644 test/new_tests/issue813-fixed-dependency/.gitignore create mode 100644 test/new_tests/issue813-fixed-dependency/dub.json rename test/{issue813-fixed-dependency => new_tests/issue813-fixed-dependency/sample}/main/dub.sdl (100%) rename test/{issue813-fixed-dependency => new_tests/issue813-fixed-dependency/sample}/main/dub.selections.json (100%) rename test/{issue813-fixed-dependency => new_tests/issue813-fixed-dependency/sample}/main/src/app.d (100%) rename test/{issue813-fixed-dependency => new_tests/issue813-fixed-dependency/sample}/sub/dub.sdl (100%) rename test/{issue813-fixed-dependency => new_tests/issue813-fixed-dependency/sample}/sub/sub/dub.sdl (100%) rename test/{issue813-fixed-dependency => new_tests/issue813-fixed-dependency/sample}/sub/sub/src/sub/test.d (100%) create mode 100644 test/new_tests/issue813-fixed-dependency/source/app.d diff --git a/test/issue813-fixed-dependency.sh b/test/issue813-fixed-dependency.sh deleted file mode 100755 index bddf078840..0000000000 --- a/test/issue813-fixed-dependency.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash - -. $(dirname "${BASH_SOURCE[0]}")/common.sh -cd ${CURR_DIR}/issue813-fixed-dependency -rm -rf main/.dub -rm -rf sub/.dub -rm -rf sub/sub/.dub -${DUB} build --bare --compiler=${DC} main diff --git a/test/issue813-fixed-dependency/.no_build b/test/issue813-fixed-dependency/.no_build deleted file mode 100644 index 8d1c8b69c3..0000000000 --- a/test/issue813-fixed-dependency/.no_build +++ /dev/null @@ -1 +0,0 @@ - diff --git a/test/new_tests/issue813-fixed-dependency/.gitignore b/test/new_tests/issue813-fixed-dependency/.gitignore new file mode 100644 index 0000000000..a1a74e20a1 --- /dev/null +++ b/test/new_tests/issue813-fixed-dependency/.gitignore @@ -0,0 +1,10 @@ +/sample/** +!/sample/ +!/sample/main/ +!/sample/sub/ +!/sample/sub/sub +!/sample/**/dub.sdl +!/sample/**/src/ +!/sample/**/src/** + +!/sample/main/dub.selections.json \ No newline at end of file diff --git a/test/new_tests/issue813-fixed-dependency/dub.json b/test/new_tests/issue813-fixed-dependency/dub.json new file mode 100644 index 0000000000..51c955b746 --- /dev/null +++ b/test/new_tests/issue813-fixed-dependency/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue813-fixed-dependency", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/issue813-fixed-dependency/main/dub.sdl b/test/new_tests/issue813-fixed-dependency/sample/main/dub.sdl similarity index 100% rename from test/issue813-fixed-dependency/main/dub.sdl rename to test/new_tests/issue813-fixed-dependency/sample/main/dub.sdl diff --git a/test/issue813-fixed-dependency/main/dub.selections.json b/test/new_tests/issue813-fixed-dependency/sample/main/dub.selections.json similarity index 100% rename from test/issue813-fixed-dependency/main/dub.selections.json rename to test/new_tests/issue813-fixed-dependency/sample/main/dub.selections.json diff --git a/test/issue813-fixed-dependency/main/src/app.d b/test/new_tests/issue813-fixed-dependency/sample/main/src/app.d similarity index 100% rename from test/issue813-fixed-dependency/main/src/app.d rename to test/new_tests/issue813-fixed-dependency/sample/main/src/app.d diff --git a/test/issue813-fixed-dependency/sub/dub.sdl b/test/new_tests/issue813-fixed-dependency/sample/sub/dub.sdl similarity index 100% rename from test/issue813-fixed-dependency/sub/dub.sdl rename to test/new_tests/issue813-fixed-dependency/sample/sub/dub.sdl diff --git a/test/issue813-fixed-dependency/sub/sub/dub.sdl b/test/new_tests/issue813-fixed-dependency/sample/sub/sub/dub.sdl similarity index 100% rename from test/issue813-fixed-dependency/sub/sub/dub.sdl rename to test/new_tests/issue813-fixed-dependency/sample/sub/sub/dub.sdl diff --git a/test/issue813-fixed-dependency/sub/sub/src/sub/test.d b/test/new_tests/issue813-fixed-dependency/sample/sub/sub/src/sub/test.d similarity index 100% rename from test/issue813-fixed-dependency/sub/sub/src/sub/test.d rename to test/new_tests/issue813-fixed-dependency/sample/sub/sub/src/sub/test.d diff --git a/test/new_tests/issue813-fixed-dependency/source/app.d b/test/new_tests/issue813-fixed-dependency/source/app.d new file mode 100644 index 0000000000..6297cadcb3 --- /dev/null +++ b/test/new_tests/issue813-fixed-dependency/source/app.d @@ -0,0 +1,13 @@ +import common; + +import std.algorithm; +import std.file; +import std.path; +import std.process; + +void main () { + chdir("sample"); + + if (spawnProcess([dub, "build", "--bare", "main"]).wait != 0) + die("dub build failed"); +} From fa0b47f248599db4327b27180ca321725beacf45 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 26 Jul 2025 12:51:44 +0300 Subject: [PATCH 144/187] issue813-pure-sub-dependency Signed-off-by: Andrei Horodniceanu --- test/issue813-pure-sub-dependency.sh | 9 --------- test/issue813-pure-sub-dependency/.no_build | 1 - .../issue813-pure-sub-dependency/.gitignore | 8 ++++++++ .../new_tests/issue813-pure-sub-dependency/dub.json | 8 ++++++++ .../sample}/main/dub.sdl | 0 .../sample}/main/src/app.d | 0 .../sample}/sub/dub.sdl | 0 .../sample}/sub/sub/dub.sdl | 0 .../sample}/sub/sub/src/sub/test.d | 0 .../issue813-pure-sub-dependency/source/app.d | 13 +++++++++++++ 10 files changed, 29 insertions(+), 10 deletions(-) delete mode 100755 test/issue813-pure-sub-dependency.sh delete mode 100644 test/issue813-pure-sub-dependency/.no_build create mode 100644 test/new_tests/issue813-pure-sub-dependency/.gitignore create mode 100644 test/new_tests/issue813-pure-sub-dependency/dub.json rename test/{issue813-pure-sub-dependency => new_tests/issue813-pure-sub-dependency/sample}/main/dub.sdl (100%) rename test/{issue813-pure-sub-dependency => new_tests/issue813-pure-sub-dependency/sample}/main/src/app.d (100%) rename test/{issue813-pure-sub-dependency => new_tests/issue813-pure-sub-dependency/sample}/sub/dub.sdl (100%) rename test/{issue813-pure-sub-dependency => new_tests/issue813-pure-sub-dependency/sample}/sub/sub/dub.sdl (100%) rename test/{issue813-pure-sub-dependency => new_tests/issue813-pure-sub-dependency/sample}/sub/sub/src/sub/test.d (100%) create mode 100644 test/new_tests/issue813-pure-sub-dependency/source/app.d diff --git a/test/issue813-pure-sub-dependency.sh b/test/issue813-pure-sub-dependency.sh deleted file mode 100755 index ec2291ebe3..0000000000 --- a/test/issue813-pure-sub-dependency.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash - -. $(dirname "${BASH_SOURCE[0]}")/common.sh -cd ${CURR_DIR}/issue813-pure-sub-dependency -rm -rf main/.dub -rm -rf sub/.dub -rm -rf sub/sub/.dub -rm -f main/dub.selections.json -${DUB} build --bare --compiler=${DC} main diff --git a/test/issue813-pure-sub-dependency/.no_build b/test/issue813-pure-sub-dependency/.no_build deleted file mode 100644 index 8d1c8b69c3..0000000000 --- a/test/issue813-pure-sub-dependency/.no_build +++ /dev/null @@ -1 +0,0 @@ - diff --git a/test/new_tests/issue813-pure-sub-dependency/.gitignore b/test/new_tests/issue813-pure-sub-dependency/.gitignore new file mode 100644 index 0000000000..102fd13ab2 --- /dev/null +++ b/test/new_tests/issue813-pure-sub-dependency/.gitignore @@ -0,0 +1,8 @@ +/sample/** +!/sample/ +!/sample/main/ +!/sample/sub/ +!/sample/sub/sub +!/sample/**/dub.sdl +!/sample/**/src/ +!/sample/**/src/** \ No newline at end of file diff --git a/test/new_tests/issue813-pure-sub-dependency/dub.json b/test/new_tests/issue813-pure-sub-dependency/dub.json new file mode 100644 index 0000000000..acbd6dfb20 --- /dev/null +++ b/test/new_tests/issue813-pure-sub-dependency/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue813-pure-sub-dependency", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/issue813-pure-sub-dependency/main/dub.sdl b/test/new_tests/issue813-pure-sub-dependency/sample/main/dub.sdl similarity index 100% rename from test/issue813-pure-sub-dependency/main/dub.sdl rename to test/new_tests/issue813-pure-sub-dependency/sample/main/dub.sdl diff --git a/test/issue813-pure-sub-dependency/main/src/app.d b/test/new_tests/issue813-pure-sub-dependency/sample/main/src/app.d similarity index 100% rename from test/issue813-pure-sub-dependency/main/src/app.d rename to test/new_tests/issue813-pure-sub-dependency/sample/main/src/app.d diff --git a/test/issue813-pure-sub-dependency/sub/dub.sdl b/test/new_tests/issue813-pure-sub-dependency/sample/sub/dub.sdl similarity index 100% rename from test/issue813-pure-sub-dependency/sub/dub.sdl rename to test/new_tests/issue813-pure-sub-dependency/sample/sub/dub.sdl diff --git a/test/issue813-pure-sub-dependency/sub/sub/dub.sdl b/test/new_tests/issue813-pure-sub-dependency/sample/sub/sub/dub.sdl similarity index 100% rename from test/issue813-pure-sub-dependency/sub/sub/dub.sdl rename to test/new_tests/issue813-pure-sub-dependency/sample/sub/sub/dub.sdl diff --git a/test/issue813-pure-sub-dependency/sub/sub/src/sub/test.d b/test/new_tests/issue813-pure-sub-dependency/sample/sub/sub/src/sub/test.d similarity index 100% rename from test/issue813-pure-sub-dependency/sub/sub/src/sub/test.d rename to test/new_tests/issue813-pure-sub-dependency/sample/sub/sub/src/sub/test.d diff --git a/test/new_tests/issue813-pure-sub-dependency/source/app.d b/test/new_tests/issue813-pure-sub-dependency/source/app.d new file mode 100644 index 0000000000..6297cadcb3 --- /dev/null +++ b/test/new_tests/issue813-pure-sub-dependency/source/app.d @@ -0,0 +1,13 @@ +import common; + +import std.algorithm; +import std.file; +import std.path; +import std.process; + +void main () { + chdir("sample"); + + if (spawnProcess([dub, "build", "--bare", "main"]).wait != 0) + die("dub build failed"); +} From ed6fdef6d6f0643171832b55b6bbf53da7e9a373 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sun, 27 Jul 2025 18:30:29 +0300 Subject: [PATCH 145/187] issue820-extra-fields-after-convert Signed-off-by: Andrei Horodniceanu --- test/issue820-extra-fields-after-convert.sh | 17 ----------------- .../.gitignore | 3 +++ .../dub.json | 8 ++++++++ .../sample/dub.json | 4 ++++ .../source/app.d | 17 +++++++++++++++++ 5 files changed, 32 insertions(+), 17 deletions(-) delete mode 100755 test/issue820-extra-fields-after-convert.sh create mode 100644 test/new_tests/issue820-extra-fields-after-convert/.gitignore create mode 100644 test/new_tests/issue820-extra-fields-after-convert/dub.json create mode 100644 test/new_tests/issue820-extra-fields-after-convert/sample/dub.json create mode 100644 test/new_tests/issue820-extra-fields-after-convert/source/app.d diff --git a/test/issue820-extra-fields-after-convert.sh b/test/issue820-extra-fields-after-convert.sh deleted file mode 100755 index 5e81e35a19..0000000000 --- a/test/issue820-extra-fields-after-convert.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env bash - -. $(dirname "${BASH_SOURCE[0]}")/common.sh - -cd ${CURR_DIR}/1-exec-simple - -cp dub.json dub.json.bak -${DUB} convert -f sdl - -if grep -qe "version\|sourcePaths\|importPaths\|configuration" dub.sdl > /dev/null; then - mv dub.json.bak dub.json - rm dub.sdl - die $LINENO 'Conversion added extra fields.' -fi - -mv dub.json.bak dub.json -rm dub.sdl diff --git a/test/new_tests/issue820-extra-fields-after-convert/.gitignore b/test/new_tests/issue820-extra-fields-after-convert/.gitignore new file mode 100644 index 0000000000..9cab3c4594 --- /dev/null +++ b/test/new_tests/issue820-extra-fields-after-convert/.gitignore @@ -0,0 +1,3 @@ +/sample/** +!/sample/ +!/sample/dub.json diff --git a/test/new_tests/issue820-extra-fields-after-convert/dub.json b/test/new_tests/issue820-extra-fields-after-convert/dub.json new file mode 100644 index 0000000000..59985a5666 --- /dev/null +++ b/test/new_tests/issue820-extra-fields-after-convert/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue820-extra-fields-after-convert", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/new_tests/issue820-extra-fields-after-convert/sample/dub.json b/test/new_tests/issue820-extra-fields-after-convert/sample/dub.json new file mode 100644 index 0000000000..14f18baccd --- /dev/null +++ b/test/new_tests/issue820-extra-fields-after-convert/sample/dub.json @@ -0,0 +1,4 @@ +{ + "name": "test", + "targetType": "executable" +} diff --git a/test/new_tests/issue820-extra-fields-after-convert/source/app.d b/test/new_tests/issue820-extra-fields-after-convert/source/app.d new file mode 100644 index 0000000000..5a912b2bdc --- /dev/null +++ b/test/new_tests/issue820-extra-fields-after-convert/source/app.d @@ -0,0 +1,17 @@ +import common; + +import std.algorithm; +import std.file; +import std.path; +import std.process; + +void main () { + chdir("sample"); + + auto p = teeProcess([dub, "convert", "-s", "-f", "sdl"]); + if (p.wait != 0) + die("dub convert failed"); + if (p.stdout.canFind("version", "sourcePaths", "importPaths", "configuration")) { + die("Conversion added extra fields"); + } +} From 34d8b1c5437890042c2552e5d403c13835d7f6d8 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 26 Jul 2025 13:03:51 +0300 Subject: [PATCH 146/187] issue838-custom-cache-paths Signed-off-by: Andrei Horodniceanu --- test/issue838-custom-cache-paths.sh | 13 ----------- test/issue838-custom-cache-paths/.no_build | 0 .../issue838-custom-cache-paths/.gitignore | 7 ++++++ .../issue838-custom-cache-paths/dub.json | 8 +++++++ .../sample}/cache/foo/1.0.0/foo/dub.sdl | 0 .../sample}/dub.sdl | 0 .../sample}/source/app.d | 0 .../issue838-custom-cache-paths/source/app.d | 22 +++++++++++++++++++ 8 files changed, 37 insertions(+), 13 deletions(-) delete mode 100755 test/issue838-custom-cache-paths.sh delete mode 100644 test/issue838-custom-cache-paths/.no_build create mode 100644 test/new_tests/issue838-custom-cache-paths/.gitignore create mode 100644 test/new_tests/issue838-custom-cache-paths/dub.json rename test/{issue838-custom-cache-paths => new_tests/issue838-custom-cache-paths/sample}/cache/foo/1.0.0/foo/dub.sdl (100%) rename test/{issue838-custom-cache-paths => new_tests/issue838-custom-cache-paths/sample}/dub.sdl (100%) rename test/{issue838-custom-cache-paths => new_tests/issue838-custom-cache-paths/sample}/source/app.d (100%) create mode 100644 test/new_tests/issue838-custom-cache-paths/source/app.d diff --git a/test/issue838-custom-cache-paths.sh b/test/issue838-custom-cache-paths.sh deleted file mode 100755 index da8e84adf5..0000000000 --- a/test/issue838-custom-cache-paths.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash -. $(dirname "${BASH_SOURCE[0]}")/common.sh - -CONFIG_FILE=$CURR_DIR/../etc/dub/settings.json - -mkdir $CURR_DIR/../etc && mkdir $CURR_DIR/../etc/dub || true -echo "{\"customCachePaths\": [\"$CURR_DIR/issue838-custom-cache-paths/cache\"]}" > $CONFIG_FILE - -trap "rm $CONFIG_FILE" EXIT - -if ! { $DUB build --root "$CURR_DIR/issue838-custom-cache-paths" --skip-registry=all; }; then - die $LINENO 'Failed to build package with custom cache path for dependencies.' -fi diff --git a/test/issue838-custom-cache-paths/.no_build b/test/issue838-custom-cache-paths/.no_build deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/new_tests/issue838-custom-cache-paths/.gitignore b/test/new_tests/issue838-custom-cache-paths/.gitignore new file mode 100644 index 0000000000..3430c6a327 --- /dev/null +++ b/test/new_tests/issue838-custom-cache-paths/.gitignore @@ -0,0 +1,7 @@ +/sample/** +!/sample/ +!/sample/dub.sdl +!/sample/source/ +!/sample/source/*.d +!/sample/cache/ +!/sample/cache/** \ No newline at end of file diff --git a/test/new_tests/issue838-custom-cache-paths/dub.json b/test/new_tests/issue838-custom-cache-paths/dub.json new file mode 100644 index 0000000000..a73abe6f49 --- /dev/null +++ b/test/new_tests/issue838-custom-cache-paths/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue838-custom-cache-paths", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/issue838-custom-cache-paths/cache/foo/1.0.0/foo/dub.sdl b/test/new_tests/issue838-custom-cache-paths/sample/cache/foo/1.0.0/foo/dub.sdl similarity index 100% rename from test/issue838-custom-cache-paths/cache/foo/1.0.0/foo/dub.sdl rename to test/new_tests/issue838-custom-cache-paths/sample/cache/foo/1.0.0/foo/dub.sdl diff --git a/test/issue838-custom-cache-paths/dub.sdl b/test/new_tests/issue838-custom-cache-paths/sample/dub.sdl similarity index 100% rename from test/issue838-custom-cache-paths/dub.sdl rename to test/new_tests/issue838-custom-cache-paths/sample/dub.sdl diff --git a/test/issue838-custom-cache-paths/source/app.d b/test/new_tests/issue838-custom-cache-paths/sample/source/app.d similarity index 100% rename from test/issue838-custom-cache-paths/source/app.d rename to test/new_tests/issue838-custom-cache-paths/sample/source/app.d diff --git a/test/new_tests/issue838-custom-cache-paths/source/app.d b/test/new_tests/issue838-custom-cache-paths/source/app.d new file mode 100644 index 0000000000..5828345998 --- /dev/null +++ b/test/new_tests/issue838-custom-cache-paths/source/app.d @@ -0,0 +1,22 @@ +import common; + +import std.algorithm; +import std.file; +import std.path; +import std.process; +import std.stdio; + +void main () { + chdir("sample"); + + import std.json; + immutable jsonPath = JSONValue(getcwd.buildPath("cache")).toString(); + + File("dub.settings.json", "w").writefln(`{ +"customCachePaths": [ %s ] +}`, + jsonPath); + + if (spawnProcess([dub, "build", "--skip-registry=all"]).wait != 0) + die("Failed to build package with custom cache path for dependencies."); +} From cff46f981c1aedd1c9007d1a024d5cb47452b693 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 26 Jul 2025 13:27:48 +0300 Subject: [PATCH 147/187] issue877-auto-fetch-package-on-run Signed-off-by: Andrei Horodniceanu --- test/issue877-auto-fetch-package-on-run.sh | 35 ------ .../dub.json | 8 ++ .../source/app.d | 100 ++++++++++++++++++ 3 files changed, 108 insertions(+), 35 deletions(-) delete mode 100755 test/issue877-auto-fetch-package-on-run.sh create mode 100644 test/new_tests/issue877-auto-fetch-package-on-run/dub.json create mode 100644 test/new_tests/issue877-auto-fetch-package-on-run/source/app.d diff --git a/test/issue877-auto-fetch-package-on-run.sh b/test/issue877-auto-fetch-package-on-run.sh deleted file mode 100755 index ddaea8a3bd..0000000000 --- a/test/issue877-auto-fetch-package-on-run.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash - -set -eu -o pipefail -set -x -$DUB remove 'gitcompatibledubpackage@*' || true - -# check whether the interactive run mode works -echo "y" | $DUB run gitcompatibledubpackage | grep "Hello DUB" -$DUB remove gitcompatibledubpackage - -! (echo "n" | $DUB run gitcompatibledubpackage | grep "Hello DUB") -! $DUB remove gitcompatibledubpackage - -# check -y -$DUB run --yes gitcompatibledubpackage | grep "Hello DUB" -$DUB remove gitcompatibledubpackage - -# check --yes -$DUB run -y gitcompatibledubpackage | grep "Hello DUB" -$DUB remove gitcompatibledubpackage - -(! $DUB run --non-interactive gitcompatibledubpackage || true) 2>&1 | \ - grep "Failed to find.*gitcompatibledubpackage.*locally" - -# check supplying versions directly -dub_log="$($DUB run gitcompatibledubpackage@1.0.3)" -echo "$dub_log" | grep "Hello DUB" -echo "$dub_log" | grep "Fetching.*1.0.3" -$DUB remove gitcompatibledubpackage - -# check supplying an invalid version -(! $DUB run gitcompatibledubpackage@0.42.43 || true) 2>&1 | \ - grep 'No package gitcompatibledubpackage was found matching the dependency 0[.]42[.]43' - -! $DUB remove gitcompatibledubpackage diff --git a/test/new_tests/issue877-auto-fetch-package-on-run/dub.json b/test/new_tests/issue877-auto-fetch-package-on-run/dub.json new file mode 100644 index 0000000000..ea9c3e3cb8 --- /dev/null +++ b/test/new_tests/issue877-auto-fetch-package-on-run/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue877-auto-fetch-package-on-run", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/new_tests/issue877-auto-fetch-package-on-run/source/app.d b/test/new_tests/issue877-auto-fetch-package-on-run/source/app.d new file mode 100644 index 0000000000..5bbf185659 --- /dev/null +++ b/test/new_tests/issue877-auto-fetch-package-on-run/source/app.d @@ -0,0 +1,100 @@ +import common; + +import std.algorithm; +import std.file; +import std.path; +import std.process; +import std.regex; +import std.stdio; + +void main () { + execute([dub, "remove", "gitcompatibledubpackage@*"]); + + // check whether the interactive run mode works + { + auto p = teeProcess([dub, "run", "gitcompatibledubpackage"], + Redirect.stdin | Redirect.stdout); + p.stdin.writeln("y"); + p.stdin.close(); + if (p.wait != 0) + die("dub run failed"); + if (!p.stdout.canFind("Hello DUB")) + die("Didn't find 'Hello DUB' in output"); + if (spawnProcess([dub, "remove", "gitcompatibledubpackage"]).wait != 0) + die("Couldn't remove gitcompatibledubpackage"); + } + + { + auto p = teeProcess([dub, "run", "gitcompatibledubpackage"], + Redirect.stdin | Redirect.stdout); + p.stdin.writeln("n"); + p.stdin.close(); + if (p.wait == 0) + die("dub run succeeded"); + if (p.stdout.canFind("Hello DUB")) + die("Found 'Hello DUB' in output"); + if (spawnProcess([dub, "remove", "gitcompatibledubpackage"]).wait == 0) + die("gitcompatibledubpackage should not have been installed"); + } + + // check --yes + { + auto p = teeProcess([dub, "run", "--yes", "gitcompatibledubpackage"], + Redirect.stdout); + if (p.wait != 0) + die("dub run failed"); + if (!p.stdout.canFind("Hello DUB")) + die("Didn't find 'Hello DUB' in output"); + if (spawnProcess([dub, "remove", "gitcompatibledubpackage"]).wait != 0) + die("Couldn't remove gitcompatibledubpackage"); + } + + // check -y + { + auto p = teeProcess([dub, "run", "-y", "gitcompatibledubpackage"], + Redirect.stdout); + if (p.wait != 0) + die("dub run failed"); + if (!p.stdout.canFind("Hello DUB")) + die("Didn't find 'Hello DUB' in output"); + if (spawnProcess([dub, "remove", "gitcompatibledubpackage"]).wait != 0) + die("Couldn't remove gitcompatibledubpackage"); + } + + { + auto p = teeProcess([dub, "run", "--non-interactive", "gitcompatibledubpackage"], + Redirect.stdout | Redirect.stderrToStdout); + if (p.wait == 0) + die("dub run shouldn't have succeeded"); + if (!p.stdout.matchFirst(`Failed to find.*gitcompatibledubpackage.*locally`)) + die("Didn't find expected line in output"); + } + + // check supplying versions directly + { + auto p = teeProcess([dub, "run", "gitcompatibledubpackage@1.0.3"], + Redirect.stdout); + if (p.wait != 0) + die("dub run failed"); + + if (!p.stdout.canFind("Hello DUB")) + die("Didn't find 'Hello DUB' in output"); + if (!p.stdout.matchFirst(`Fetching.*1.0.3`)) + die("Didn't find Fetching line in output"); + if (spawnProcess([dub, "remove", "gitcompatibledubpackage"]).wait != 0) + die("Couldn't remove gitcompatibledubpackage"); + } + + // check supplying an invalid version + { + auto p = teeProcess([dub, "run", "gitcompatibledubpackage@0.42.43"], + Redirect.stdout | Redirect.stderrToStdout); + if (p.pid.wait == 0) + die("dub run succeeded"); + + if (!p.stdout.canFind("No package gitcompatibledubpackage was found matching the dependency 0.42.43")) + die("Didn't find expected line in output"); + if (spawnProcess([dub, "remove", "gitcompatibledubpackage"]).wait == 0) + die("gitcompatibledubpackage should not have been installed"); + } +} From 21bdbdd7bea9965426e57d9fc37b98aa0625229c Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 26 Jul 2025 13:33:26 +0300 Subject: [PATCH 148/187] issue884-init-defer-file-creation Signed-off-by: Andrei Horodniceanu --- test/issue884-init-defer-file-creation.sh | 27 ------------------- .../dub.json | 8 ++++++ .../source/app.d | 25 +++++++++++++++++ 3 files changed, 33 insertions(+), 27 deletions(-) delete mode 100755 test/issue884-init-defer-file-creation.sh create mode 100644 test/new_tests/issue884-init-defer-file-creation/dub.json create mode 100644 test/new_tests/issue884-init-defer-file-creation/source/app.d diff --git a/test/issue884-init-defer-file-creation.sh b/test/issue884-init-defer-file-creation.sh deleted file mode 100755 index 7ffab211c9..0000000000 --- a/test/issue884-init-defer-file-creation.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env bash - -. $(dirname "${BASH_SOURCE[0]}")/common.sh - -TMPDIR=${CURR_DIR}tmppack -echo $TMPDIR - -mkdir ${TMPDIR} -cd ${TMPDIR} - -# kill dub init during interactive mode -mkfifo in -${DUB} init < in & -sleep 1 -kill $! -rm in - -# ensure that no files are left behind -NFILES_PLUS_ONE=`ls -la | wc -l` - -cd ${CURR_DIR} -rm -r ${TMPDIR} - -# ignore sum + "." + ".." -if [ ${NFILES_PLUS_ONE} -gt 3 ]; then - die $LINENO 'Aborted dub init left spurious files around.' -fi diff --git a/test/new_tests/issue884-init-defer-file-creation/dub.json b/test/new_tests/issue884-init-defer-file-creation/dub.json new file mode 100644 index 0000000000..a1aad980ec --- /dev/null +++ b/test/new_tests/issue884-init-defer-file-creation/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue884-init-defer-file-creation", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/new_tests/issue884-init-defer-file-creation/source/app.d b/test/new_tests/issue884-init-defer-file-creation/source/app.d new file mode 100644 index 0000000000..8178de3a45 --- /dev/null +++ b/test/new_tests/issue884-init-defer-file-creation/source/app.d @@ -0,0 +1,25 @@ +import common; + +import core.thread.osthread; +import core.time; +import std.algorithm; +import std.file; +import std.path; +import std.range; +import std.process; + +void main () { + if (exists("test")) rmdirRecurse("test"); + mkdir("test"); + chdir("test"); + auto p = pipeProcess([dub, "init"], Redirect.stdin); + scope(exit) p.pid.wait; + + Thread.sleep(1.seconds); + p.pid.kill; + p.stdin.close(); + + immutable filesCount = dirEntries(".", SpanMode.shallow).walkLength; + if (filesCount > 0) + die("Aborted dub init left spurious files around."); +} From ed2739d3728a974e8948626cec471227d4b98665 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sun, 27 Jul 2025 19:28:05 +0300 Subject: [PATCH 149/187] issue895-local-configuration Signed-off-by: Andrei Horodniceanu --- test/issue895-local-configuration.sh | 78 ------------- .../issue895-local-configuration/.gitignore | 5 + .../issue895-local-configuration/dub.json | 8 ++ .../sample/dub.json | 3 + .../sample/source/app.d | 1 + .../issue895-local-configuration/source/app.d | 104 ++++++++++++++++++ .../issue895-local-configuration/test.config | 5 + 7 files changed, 126 insertions(+), 78 deletions(-) delete mode 100755 test/issue895-local-configuration.sh create mode 100644 test/new_tests/issue895-local-configuration/.gitignore create mode 100644 test/new_tests/issue895-local-configuration/dub.json create mode 100644 test/new_tests/issue895-local-configuration/sample/dub.json create mode 100644 test/new_tests/issue895-local-configuration/sample/source/app.d create mode 100644 test/new_tests/issue895-local-configuration/source/app.d create mode 100644 test/new_tests/issue895-local-configuration/test.config diff --git a/test/issue895-local-configuration.sh b/test/issue895-local-configuration.sh deleted file mode 100755 index 7ce00bb2f6..0000000000 --- a/test/issue895-local-configuration.sh +++ /dev/null @@ -1,78 +0,0 @@ -#!/usr/bin/env bash -. $(dirname "${BASH_SOURCE[0]}")/common.sh - -if [ -e /var/lib/dub/settings.json ]; then - die $LINENO 'Found existing system wide DUB configuration. Aborting.' -fi - -if [ -e ~/.dub/settings.json ]; then - die $LINENO 'Found existing user wide DUB configuration. Aborting.' -fi - -cd ${CURR_DIR} -mkdir -p ../etc/dub -echo "{\"defaultCompiler\": \"foo\"}" > ../etc/dub/settings.json -echo "Empty file named foo." > ../bin/foo - -function cleanup { - rm -r ../etc -} - -trap cleanup EXIT - -unset DC - -if ! { ${DUB} describe --single issue103-single-file-package.d 2>&1 || true; } | grep -cF "Unknown compiler: $(dirname $CURR_DIR)/bin/foo"; then - rm ../bin/foo - die $LINENO 'DUB did not find the local configuration with an adjacent compiler.' -fi - -echo "{\"defaultCompiler\": \"$CURR_DIR/foo\"}" > ../etc/dub/settings.json -mv ../bin/foo $CURR_DIR - -if ! { ${DUB} describe --single issue103-single-file-package.d 2>&1 || true; } | grep -cF "Unknown compiler: $CURR_DIR/foo"; then - rm $CURR_DIR/foo - die $LINENO 'DUB did not find a locally-configured compiler with an absolute path.' -fi - -echo "{\"defaultCompiler\": \"~/.dub/foo\"}" > ../etc/dub/settings.json -mv $CURR_DIR/foo ~/.dub/ - -if ! { ${DUB} describe --single issue103-single-file-package.d 2>&1 || true; } | grep -cF "Unknown compiler: "; then - rm ~/.dub/foo - die $LINENO 'DUB did not find a locally-configured compiler with a tilde-prefixed path.' -fi - -echo "{\"defaultCompiler\": \"\$DUB_BINARY_PATH/../foo\"}" > ../etc/dub/settings.json -mv ~/.dub/foo .. - -if ! { ${DUB} describe --single issue103-single-file-package.d 2>&1 || true; } | grep -cF "Unknown compiler: $(dirname $CURR_DIR)/bin/../foo"; then - rm ../foo - die $LINENO 'DUB did not find a locally-configured compiler with a DUB-relative path.' -fi - -echo "{\"defaultCompiler\": \"../foo\"}" > ../etc/dub/settings.json - -if ! { ${DUB} describe --single issue103-single-file-package.d 2>&1 || true; } | grep -cF "defaultCompiler specified in a DUB config file cannot use an unqualified relative path"; then - rm ../foo - die $LINENO 'DUB did not error properly for a locally-configured compiler with a relative path.' -fi - -rm ../etc/dub/settings.json -echo "Empty file named ldc2." > ../bin/ldc2 - -if ! { ${DUB} describe --single issue103-single-file-package.d 2>&1 || true; } | grep -cF "Failed to execute '$(dirname $CURR_DIR)/bin/ldc2'"; then - rm ../bin/ldc2 - die $LINENO 'DUB did not find ldc2 adjacent to it.' -fi - -echo "{\"defaultCompiler\": \"foo\"}" > ../etc/dub/settings.json -rm ../bin/ldc2 -export PATH=$(dirname $CURR_DIR)${PATH:+:$PATH} - -if ! { ${DUB} describe --single issue103-single-file-package.d 2>&1 || true; } | grep -cF "Unknown compiler: foo"; then - rm ../foo - die $LINENO 'DUB did not find a locally-configured compiler in its PATH.' -fi - -rm ../foo diff --git a/test/new_tests/issue895-local-configuration/.gitignore b/test/new_tests/issue895-local-configuration/.gitignore new file mode 100644 index 0000000000..20656516f1 --- /dev/null +++ b/test/new_tests/issue895-local-configuration/.gitignore @@ -0,0 +1,5 @@ +/sample/** +!/sample/ +!/sample/dub.json +!/sample/source/ +!/sample/source/*.d diff --git a/test/new_tests/issue895-local-configuration/dub.json b/test/new_tests/issue895-local-configuration/dub.json new file mode 100644 index 0000000000..bf1646c784 --- /dev/null +++ b/test/new_tests/issue895-local-configuration/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue895-local-configuration", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/new_tests/issue895-local-configuration/sample/dub.json b/test/new_tests/issue895-local-configuration/sample/dub.json new file mode 100644 index 0000000000..e4ed6862ac --- /dev/null +++ b/test/new_tests/issue895-local-configuration/sample/dub.json @@ -0,0 +1,3 @@ +{ + "name": "sample" +} diff --git a/test/new_tests/issue895-local-configuration/sample/source/app.d b/test/new_tests/issue895-local-configuration/sample/source/app.d new file mode 100644 index 0000000000..d66321b3c5 --- /dev/null +++ b/test/new_tests/issue895-local-configuration/sample/source/app.d @@ -0,0 +1 @@ +void main () {} diff --git a/test/new_tests/issue895-local-configuration/source/app.d b/test/new_tests/issue895-local-configuration/source/app.d new file mode 100644 index 0000000000..1b6b95870e --- /dev/null +++ b/test/new_tests/issue895-local-configuration/source/app.d @@ -0,0 +1,104 @@ +import common; + +import std.algorithm; +import std.file; +import std.json; +import std.path; +import std.process; +import std.stdio : File; + +void main () { + chdir("sample"); + environment.remove("DC"); + immutable dubDir = dub.dirName; + + { + immutable path = dubDir.buildPath("foo"); + immutable configPath = "foo"; + immutable needle = "Unknown compiler: " ~ absolutePath(path); + immutable errorMessage = "DUB did not find the local configuration with an adjacent compiler."; + + testCase(path, configPath, needle, errorMessage); + } + + { + immutable path = getcwd.buildPath("foo"); + immutable configPath = path; + immutable needle = "Unknown compiler: " ~ path; + immutable errorMessage = "DUB did not find a locally-configured compiler with an absolute path."; + + testCase(path, configPath, needle, errorMessage); + } + + version(Posix) + {{ + immutable path = getcwd.buildPath("foo"); + immutable configPath = "~/foo"; + immutable needle = "Unknown compiler: "; + immutable errorMessage = "DUB did not find a locally-configured compiler with a tilde-prefixed path."; + + testCase(path, configPath, needle, errorMessage, ["HOME": getcwd]); + }} + + { + immutable path = getcwd.buildPath("foo"); + + immutable relPath = relativePath(path, dubDir); + immutable configPath = "$DUB_BINARY_PATH".buildPath(relPath); + + immutable needle = "Unknown compiler: " ~ dubDir.buildPath(relPath); + immutable errorMessage = "DUB did not find a locally-configured compiler with a DUB-relative path."; + + testCase(path, configPath, needle, errorMessage); + } + + { + immutable path = null; + immutable configPath = "../foo"; + immutable needle = "defaultCompiler specified in a DUB config file cannot use an unqualified relative path"; + immutable errorMessage = "DUB did not error properly for a locally-configured compiler with a relative path."; + + testCase(path, configPath, needle, errorMessage); + } + + { + immutable path = dubDir.buildPath("ldc2"); + immutable configPath = null; + version(Posix) + immutable needle = "Failed to execute '" ~ absolutePath(path) ~ "'"; + else + immutable needle = `Failed to spawn process "` ~ absolutePath(path) ~ `.exe"`; + immutable errorMessage = "DUB did not find ldc2 adjacent to it."; + + testCase(path, configPath, needle, errorMessage); + } + + { + immutable path = getcwd.buildPath("foo"); + immutable configPath = "foo"; + immutable needle = "Unknown compiler: foo"; + immutable errorMessage = "DUB did not find a locally-configured compiler in its PATH."; + + testCase(path, configPath, needle, errorMessage, ["PATH": getcwd ~ pathSeparator ~ environment["PATH"]]); + } +} + +void testCase(string path, string configPath, string needle, string errorMessage, const string[string] env = null) { + immutable cmd = [ dub, "describe", "--data=main-source-file" ]; + + if (path) + path ~= DotExe; + + if (path) write(path, "An empty file"); + scope(exit) if (path) remove(path); + + if (configPath) + File("dub.settings.json", "w").writefln(`{ "defaultCompiler": %s }`, JSONValue(configPath).toString()); + // leave dub.settings.json in the test dir when it fails + scope(success) if (configPath) remove("dub.settings.json"); + + auto p = teeProcess(cmd, Redirect.stdout | Redirect.stderrToStdout, env); + p.wait; + if (!p.stdout.canFind(needle)) + die(errorMessage); +} diff --git a/test/new_tests/issue895-local-configuration/test.config b/test/new_tests/issue895-local-configuration/test.config new file mode 100644 index 0000000000..6a17d7e370 --- /dev/null +++ b/test/new_tests/issue895-local-configuration/test.config @@ -0,0 +1,5 @@ +# Adding ldc2 to bin/dub may be picked up by other tests +# +# Requiring that DC is an absolute path when passed +# to the test runner would solve it +must_be_run_alone = true \ No newline at end of file From 677f9a6093d0e82de3635b44cb40d20e2a6fb22d Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sun, 27 Jul 2025 19:28:16 +0300 Subject: [PATCH 150/187] issue923-subpackage-deps Signed-off-by: Andrei Horodniceanu --- test/issue923-subpackage-deps.sh | 14 -------------- test/issue923-subpackage-deps/.no_build | 1 - .../issue923-subpackage-deps/.gitignore | 8 ++++++++ .../new_tests/issue923-subpackage-deps/dub.json | 8 ++++++++ .../issue923-subpackage-deps/sample}/a/dub.sdl | 0 .../issue923-subpackage-deps/sample}/b/dub.sdl | 0 .../sample}/b/source/b.d | 0 .../sample}/main/dub.sdl | 0 .../sample}/main/source/app.d | 0 .../issue923-subpackage-deps/source/app.d | 17 +++++++++++++++++ 10 files changed, 33 insertions(+), 15 deletions(-) delete mode 100755 test/issue923-subpackage-deps.sh delete mode 100644 test/issue923-subpackage-deps/.no_build create mode 100644 test/new_tests/issue923-subpackage-deps/.gitignore create mode 100644 test/new_tests/issue923-subpackage-deps/dub.json rename test/{issue923-subpackage-deps => new_tests/issue923-subpackage-deps/sample}/a/dub.sdl (100%) rename test/{issue923-subpackage-deps => new_tests/issue923-subpackage-deps/sample}/b/dub.sdl (100%) rename test/{issue923-subpackage-deps => new_tests/issue923-subpackage-deps/sample}/b/source/b.d (100%) rename test/{issue923-subpackage-deps => new_tests/issue923-subpackage-deps/sample}/main/dub.sdl (100%) rename test/{issue923-subpackage-deps => new_tests/issue923-subpackage-deps/sample}/main/source/app.d (100%) create mode 100644 test/new_tests/issue923-subpackage-deps/source/app.d diff --git a/test/issue923-subpackage-deps.sh b/test/issue923-subpackage-deps.sh deleted file mode 100755 index f3be79c4fa..0000000000 --- a/test/issue923-subpackage-deps.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash - -. $(dirname "${BASH_SOURCE[0]}")/common.sh -cd ${CURR_DIR}/issue923-subpackage-deps -rm -rf main/.dub -rm -rf a/.dub -rm -rf b/.dub -rm -f main/dub.selections.json -${DUB} build --bare --compiler=${DC} main - - -if ! grep -c -e \"b\" main/dub.selections.json; then - die $LINENO 'Dependency b not resolved.' -fi diff --git a/test/issue923-subpackage-deps/.no_build b/test/issue923-subpackage-deps/.no_build deleted file mode 100644 index 8d1c8b69c3..0000000000 --- a/test/issue923-subpackage-deps/.no_build +++ /dev/null @@ -1 +0,0 @@ - diff --git a/test/new_tests/issue923-subpackage-deps/.gitignore b/test/new_tests/issue923-subpackage-deps/.gitignore new file mode 100644 index 0000000000..04a5b7003d --- /dev/null +++ b/test/new_tests/issue923-subpackage-deps/.gitignore @@ -0,0 +1,8 @@ +/sample/** +!/sample/ +!/sample/a/ +!/sample/b/ +!/sample/main/ +!/sample/*/dub.sdl +!/sample/*/source/ +!/sample/*/source/*.d \ No newline at end of file diff --git a/test/new_tests/issue923-subpackage-deps/dub.json b/test/new_tests/issue923-subpackage-deps/dub.json new file mode 100644 index 0000000000..7de3456821 --- /dev/null +++ b/test/new_tests/issue923-subpackage-deps/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue923-subpackage-deps", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/issue923-subpackage-deps/a/dub.sdl b/test/new_tests/issue923-subpackage-deps/sample/a/dub.sdl similarity index 100% rename from test/issue923-subpackage-deps/a/dub.sdl rename to test/new_tests/issue923-subpackage-deps/sample/a/dub.sdl diff --git a/test/issue923-subpackage-deps/b/dub.sdl b/test/new_tests/issue923-subpackage-deps/sample/b/dub.sdl similarity index 100% rename from test/issue923-subpackage-deps/b/dub.sdl rename to test/new_tests/issue923-subpackage-deps/sample/b/dub.sdl diff --git a/test/issue923-subpackage-deps/b/source/b.d b/test/new_tests/issue923-subpackage-deps/sample/b/source/b.d similarity index 100% rename from test/issue923-subpackage-deps/b/source/b.d rename to test/new_tests/issue923-subpackage-deps/sample/b/source/b.d diff --git a/test/issue923-subpackage-deps/main/dub.sdl b/test/new_tests/issue923-subpackage-deps/sample/main/dub.sdl similarity index 100% rename from test/issue923-subpackage-deps/main/dub.sdl rename to test/new_tests/issue923-subpackage-deps/sample/main/dub.sdl diff --git a/test/issue923-subpackage-deps/main/source/app.d b/test/new_tests/issue923-subpackage-deps/sample/main/source/app.d similarity index 100% rename from test/issue923-subpackage-deps/main/source/app.d rename to test/new_tests/issue923-subpackage-deps/sample/main/source/app.d diff --git a/test/new_tests/issue923-subpackage-deps/source/app.d b/test/new_tests/issue923-subpackage-deps/source/app.d new file mode 100644 index 0000000000..ec9d135432 --- /dev/null +++ b/test/new_tests/issue923-subpackage-deps/source/app.d @@ -0,0 +1,17 @@ +import common; + +import std.algorithm; +import std.file; +import std.path; +import std.process; + +void main () { + chdir("sample"); + if (exists("main/dub.selections.json")) remove("main/dub.selections.json"); + + if (spawnProcess([dub, "build", "--bare", "main"]).wait != 0) + die("dub build failed"); + + if (!readText("main/dub.selections.json").canFind(`"b"`)) + die("Dependency b not resolved."); +} From 7b07e442f40370e02efb1a86a8ab535805f1cfd7 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 26 Jul 2025 15:11:31 +0300 Subject: [PATCH 151/187] issue934-path-dep Signed-off-by: Andrei Horodniceanu --- test/issue934-path-dep.sh | 10 ---------- test/issue934-path-dep/.no_build | 1 - test/new_tests/issue934-path-dep/.gitignore | 8 ++++++++ test/new_tests/issue934-path-dep/dub.json | 8 ++++++++ .../issue934-path-dep/sample}/a/dub.sdl | 0 .../issue934-path-dep/sample}/b/dub.sdl | 0 .../issue934-path-dep/sample}/b/source/b.d | 0 .../issue934-path-dep/sample}/main/dub.sdl | 0 .../issue934-path-dep/sample}/main/source/app.d | 0 test/new_tests/issue934-path-dep/source/app.d | 14 ++++++++++++++ 10 files changed, 30 insertions(+), 11 deletions(-) delete mode 100755 test/issue934-path-dep.sh delete mode 100644 test/issue934-path-dep/.no_build create mode 100644 test/new_tests/issue934-path-dep/.gitignore create mode 100644 test/new_tests/issue934-path-dep/dub.json rename test/{issue934-path-dep => new_tests/issue934-path-dep/sample}/a/dub.sdl (100%) rename test/{issue934-path-dep => new_tests/issue934-path-dep/sample}/b/dub.sdl (100%) rename test/{issue934-path-dep => new_tests/issue934-path-dep/sample}/b/source/b.d (100%) rename test/{issue934-path-dep => new_tests/issue934-path-dep/sample}/main/dub.sdl (100%) rename test/{issue934-path-dep => new_tests/issue934-path-dep/sample}/main/source/app.d (100%) create mode 100644 test/new_tests/issue934-path-dep/source/app.d diff --git a/test/issue934-path-dep.sh b/test/issue934-path-dep.sh deleted file mode 100755 index 387521bfa5..0000000000 --- a/test/issue934-path-dep.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash - -. $(dirname "${BASH_SOURCE[0]}")/common.sh -cd ${CURR_DIR}/issue934-path-dep -rm -rf main/.dub -rm -rf a/.dub -rm -rf b/.dub -rm -f main/dub.selections.json -cd main -${DUB} build --compiler=${DC} diff --git a/test/issue934-path-dep/.no_build b/test/issue934-path-dep/.no_build deleted file mode 100644 index 8d1c8b69c3..0000000000 --- a/test/issue934-path-dep/.no_build +++ /dev/null @@ -1 +0,0 @@ - diff --git a/test/new_tests/issue934-path-dep/.gitignore b/test/new_tests/issue934-path-dep/.gitignore new file mode 100644 index 0000000000..04a5b7003d --- /dev/null +++ b/test/new_tests/issue934-path-dep/.gitignore @@ -0,0 +1,8 @@ +/sample/** +!/sample/ +!/sample/a/ +!/sample/b/ +!/sample/main/ +!/sample/*/dub.sdl +!/sample/*/source/ +!/sample/*/source/*.d \ No newline at end of file diff --git a/test/new_tests/issue934-path-dep/dub.json b/test/new_tests/issue934-path-dep/dub.json new file mode 100644 index 0000000000..6ecf7947a5 --- /dev/null +++ b/test/new_tests/issue934-path-dep/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue934-path-dep", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/issue934-path-dep/a/dub.sdl b/test/new_tests/issue934-path-dep/sample/a/dub.sdl similarity index 100% rename from test/issue934-path-dep/a/dub.sdl rename to test/new_tests/issue934-path-dep/sample/a/dub.sdl diff --git a/test/issue934-path-dep/b/dub.sdl b/test/new_tests/issue934-path-dep/sample/b/dub.sdl similarity index 100% rename from test/issue934-path-dep/b/dub.sdl rename to test/new_tests/issue934-path-dep/sample/b/dub.sdl diff --git a/test/issue934-path-dep/b/source/b.d b/test/new_tests/issue934-path-dep/sample/b/source/b.d similarity index 100% rename from test/issue934-path-dep/b/source/b.d rename to test/new_tests/issue934-path-dep/sample/b/source/b.d diff --git a/test/issue934-path-dep/main/dub.sdl b/test/new_tests/issue934-path-dep/sample/main/dub.sdl similarity index 100% rename from test/issue934-path-dep/main/dub.sdl rename to test/new_tests/issue934-path-dep/sample/main/dub.sdl diff --git a/test/issue934-path-dep/main/source/app.d b/test/new_tests/issue934-path-dep/sample/main/source/app.d similarity index 100% rename from test/issue934-path-dep/main/source/app.d rename to test/new_tests/issue934-path-dep/sample/main/source/app.d diff --git a/test/new_tests/issue934-path-dep/source/app.d b/test/new_tests/issue934-path-dep/source/app.d new file mode 100644 index 0000000000..1b40df4d33 --- /dev/null +++ b/test/new_tests/issue934-path-dep/source/app.d @@ -0,0 +1,14 @@ +import common; + +import std.algorithm; +import std.file; +import std.path; +import std.process; + +void main () { + chdir("sample/main"); + if (exists("dub.selections.json")) remove("dub.selections.json"); + + if (spawnProcess([dub, "build"]).wait != 0) + die("dub build failed"); +} From 5ed7b144fb706fca798c6f16d7ad93f21b048771 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 26 Jul 2025 15:14:26 +0300 Subject: [PATCH 152/187] issue959-path-based-subpack-dep Signed-off-by: Andrei Horodniceanu --- test/issue959-path-based-subpack-dep/dub.sdl | 6 ------ test/new_tests/issue959-path-based-subpack-dep/.gitignore | 2 ++ test/new_tests/issue959-path-based-subpack-dep/dub.sdl | 6 ++++++ .../issue959-path-based-subpack-dep/foo/dub.sdl | 4 ++-- test/{ => new_tests}/issue959-path-based-subpack-dep/main.d | 0 5 files changed, 10 insertions(+), 8 deletions(-) delete mode 100644 test/issue959-path-based-subpack-dep/dub.sdl create mode 100644 test/new_tests/issue959-path-based-subpack-dep/.gitignore create mode 100644 test/new_tests/issue959-path-based-subpack-dep/dub.sdl rename test/{ => new_tests}/issue959-path-based-subpack-dep/foo/dub.sdl (59%) rename test/{ => new_tests}/issue959-path-based-subpack-dep/main.d (100%) diff --git a/test/issue959-path-based-subpack-dep/dub.sdl b/test/issue959-path-based-subpack-dep/dub.sdl deleted file mode 100644 index 727af608d1..0000000000 --- a/test/issue959-path-based-subpack-dep/dub.sdl +++ /dev/null @@ -1,6 +0,0 @@ -name "bar" -mainSourceFile "main.d" -targetType "executable" - -dependency "foo" path="foo" -dependency "foo:baz" path="foo" diff --git a/test/new_tests/issue959-path-based-subpack-dep/.gitignore b/test/new_tests/issue959-path-based-subpack-dep/.gitignore new file mode 100644 index 0000000000..bbbb3d8d57 --- /dev/null +++ b/test/new_tests/issue959-path-based-subpack-dep/.gitignore @@ -0,0 +1,2 @@ +!/main.d +!/foo/ \ No newline at end of file diff --git a/test/new_tests/issue959-path-based-subpack-dep/dub.sdl b/test/new_tests/issue959-path-based-subpack-dep/dub.sdl new file mode 100644 index 0000000000..bdc609e138 --- /dev/null +++ b/test/new_tests/issue959-path-based-subpack-dep/dub.sdl @@ -0,0 +1,6 @@ +name "issue959-bar" +mainSourceFile "main.d" +targetType "executable" + +dependency "issue959-foo" path="foo" +dependency "issue959-foo:baz" path="foo" diff --git a/test/issue959-path-based-subpack-dep/foo/dub.sdl b/test/new_tests/issue959-path-based-subpack-dep/foo/dub.sdl similarity index 59% rename from test/issue959-path-based-subpack-dep/foo/dub.sdl rename to test/new_tests/issue959-path-based-subpack-dep/foo/dub.sdl index 8266250569..bd21f66f4b 100644 --- a/test/issue959-path-based-subpack-dep/foo/dub.sdl +++ b/test/new_tests/issue959-path-based-subpack-dep/foo/dub.sdl @@ -1,8 +1,8 @@ -name "foo" +name "issue959-foo" targetType "sourceLibrary" subPackage { name "baz" targetType "sourceLibrary" - dependency "foo" path="." + dependency "issue959-foo" path="." } diff --git a/test/issue959-path-based-subpack-dep/main.d b/test/new_tests/issue959-path-based-subpack-dep/main.d similarity index 100% rename from test/issue959-path-based-subpack-dep/main.d rename to test/new_tests/issue959-path-based-subpack-dep/main.d From 3aca29f8a763702167d509347d0f4a2150656aac Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 26 Jul 2025 15:23:03 +0300 Subject: [PATCH 153/187] issue97-targettype-none Signed-off-by: Andrei Horodniceanu --- test/issue97-targettype-none.sh | 28 ------------------- test/issue97-targettype-none/.no_build | 0 test/issue97-targettype-none/.no_run | 0 .../issue97-targettype-none/.gitignore | 8 ++++++ .../issue97-targettype-none/dub.json | 8 ++++++ .../issue97-targettype-none/sample}/a/dub.sdl | 0 .../sample}/a/source/app.d | 0 .../issue97-targettype-none/sample}/b/dub.sdl | 0 .../sample}/b/source/app.d | 0 .../issue97-targettype-none/sample}/dub.sdl | 0 .../issue97-targettype-none/source/app.d | 27 ++++++++++++++++++ 11 files changed, 43 insertions(+), 28 deletions(-) delete mode 100755 test/issue97-targettype-none.sh delete mode 100644 test/issue97-targettype-none/.no_build delete mode 100644 test/issue97-targettype-none/.no_run create mode 100644 test/new_tests/issue97-targettype-none/.gitignore create mode 100644 test/new_tests/issue97-targettype-none/dub.json rename test/{issue97-targettype-none => new_tests/issue97-targettype-none/sample}/a/dub.sdl (100%) rename test/{issue97-targettype-none => new_tests/issue97-targettype-none/sample}/a/source/app.d (100%) rename test/{issue97-targettype-none => new_tests/issue97-targettype-none/sample}/b/dub.sdl (100%) rename test/{issue97-targettype-none => new_tests/issue97-targettype-none/sample}/b/source/app.d (100%) rename test/{issue97-targettype-none => new_tests/issue97-targettype-none/sample}/dub.sdl (100%) create mode 100644 test/new_tests/issue97-targettype-none/source/app.d diff --git a/test/issue97-targettype-none.sh b/test/issue97-targettype-none.sh deleted file mode 100755 index 9017321808..0000000000 --- a/test/issue97-targettype-none.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env bash -set -e - -${DUB} build --root ${CURR_DIR}/issue97-targettype-none 2>&1 || true - -BUILD_CACHE_A="$HOME/.dub/cache/issue97-targettype-none/~master/+a/build/" -BUILD_CACHE_B="$HOME/.dub/cache/issue97-targettype-none/~master/+b/build/" - -if [ ! -d $BUILD_CACHE_A ]; then - echo "Generated 'a' subpackage build artifact not found!" 1>&2 - exit 1 -fi -if [ ! -d $BUILD_CACHE_B ]; then - echo "Generated 'b' subpackage build artifact not found!" 1>&2 - exit 1 -fi - -${DUB} clean --root ${CURR_DIR}/issue97-targettype-none 2>&1 - -# make sure both sub-packages are cleaned -if [ -d $BUILD_CACHE_A ]; then - echo "Generated 'a' subpackage build artifact were not cleaned!" 1>&2 - exit 1 -fi -if [ -d $BUILD_CACHE_B ]; then - echo "Generated 'b' subpackage build artifact were not cleaned!" 1>&2 - exit 1 -fi diff --git a/test/issue97-targettype-none/.no_build b/test/issue97-targettype-none/.no_build deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/issue97-targettype-none/.no_run b/test/issue97-targettype-none/.no_run deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/new_tests/issue97-targettype-none/.gitignore b/test/new_tests/issue97-targettype-none/.gitignore new file mode 100644 index 0000000000..4bcd49768d --- /dev/null +++ b/test/new_tests/issue97-targettype-none/.gitignore @@ -0,0 +1,8 @@ +/sample/** +!/sample/ +!/sample/dub.sdl +!/sample/a/ +!/sample/b/ +!/sample/*/dub.sdl +!/sample/*/source/ +!/sample/*/source/*.d diff --git a/test/new_tests/issue97-targettype-none/dub.json b/test/new_tests/issue97-targettype-none/dub.json new file mode 100644 index 0000000000..8ce9d92e08 --- /dev/null +++ b/test/new_tests/issue97-targettype-none/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue97-targettype-none", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/issue97-targettype-none/a/dub.sdl b/test/new_tests/issue97-targettype-none/sample/a/dub.sdl similarity index 100% rename from test/issue97-targettype-none/a/dub.sdl rename to test/new_tests/issue97-targettype-none/sample/a/dub.sdl diff --git a/test/issue97-targettype-none/a/source/app.d b/test/new_tests/issue97-targettype-none/sample/a/source/app.d similarity index 100% rename from test/issue97-targettype-none/a/source/app.d rename to test/new_tests/issue97-targettype-none/sample/a/source/app.d diff --git a/test/issue97-targettype-none/b/dub.sdl b/test/new_tests/issue97-targettype-none/sample/b/dub.sdl similarity index 100% rename from test/issue97-targettype-none/b/dub.sdl rename to test/new_tests/issue97-targettype-none/sample/b/dub.sdl diff --git a/test/issue97-targettype-none/b/source/app.d b/test/new_tests/issue97-targettype-none/sample/b/source/app.d similarity index 100% rename from test/issue97-targettype-none/b/source/app.d rename to test/new_tests/issue97-targettype-none/sample/b/source/app.d diff --git a/test/issue97-targettype-none/dub.sdl b/test/new_tests/issue97-targettype-none/sample/dub.sdl similarity index 100% rename from test/issue97-targettype-none/dub.sdl rename to test/new_tests/issue97-targettype-none/sample/dub.sdl diff --git a/test/new_tests/issue97-targettype-none/source/app.d b/test/new_tests/issue97-targettype-none/source/app.d new file mode 100644 index 0000000000..87d43a3ba4 --- /dev/null +++ b/test/new_tests/issue97-targettype-none/source/app.d @@ -0,0 +1,27 @@ +import common; + +import std.algorithm; +import std.file; +import std.path; +import std.process; + +void main () { + spawnProcess([dub, "build", "--root=sample"]).wait; + immutable pkgBuildCache = dubHome.buildPath("cache", "issue97-targettype-none", "~master"); + immutable buildCacheA = pkgBuildCache.buildPath("+a", "build"); + immutable buildCacheB = pkgBuildCache.buildPath("+b", "build"); + + if (!exists(buildCacheA)) + die("Generated 'a' subpackage build artifact not found!"); + if (!exists(buildCacheB)) + die("Generated 'b' subpackage build artifact not found!"); + + if (spawnProcess([dub, "clean", "--root=sample"]).wait != 0) + die("dub clean fialed"); + + // make sure both sub-packages are cleaned + if (exists(buildCacheA)) + die("Generated 'a' subpackage build artifact were not cleaned!"); + if (exists(buildCacheB)) + die("Generated 'b' subpackage build artifact were not cleaned!"); +} From 0d0e106c8b7d284fbaa9606d48648f4632bbb50f Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 26 Jul 2025 15:33:58 +0300 Subject: [PATCH 154/187] issue97-targettype-none-nodeps Signed-off-by: Andrei Horodniceanu --- test/issue97-targettype-none-nodeps/.fail_build | 0 test/issue97-targettype-none-nodeps/.gitignore | 5 ----- test/issue97-targettype-none-nodeps/.no_run | 0 test/new_tests/issue97-targettype-none-nodeps/.gitignore | 2 ++ .../{ => new_tests}/issue97-targettype-none-nodeps/a/dub.sdl | 0 .../issue97-targettype-none-nodeps/a/source/app.d | 0 .../{ => new_tests}/issue97-targettype-none-nodeps/b/dub.sdl | 0 .../issue97-targettype-none-nodeps/b/source/app.d | 0 test/{ => new_tests}/issue97-targettype-none-nodeps/dub.sdl | 2 +- test/new_tests/issue97-targettype-none-nodeps/test.config | 2 ++ 10 files changed, 5 insertions(+), 6 deletions(-) delete mode 100644 test/issue97-targettype-none-nodeps/.fail_build delete mode 100644 test/issue97-targettype-none-nodeps/.gitignore delete mode 100644 test/issue97-targettype-none-nodeps/.no_run create mode 100644 test/new_tests/issue97-targettype-none-nodeps/.gitignore rename test/{ => new_tests}/issue97-targettype-none-nodeps/a/dub.sdl (100%) rename test/{ => new_tests}/issue97-targettype-none-nodeps/a/source/app.d (100%) rename test/{ => new_tests}/issue97-targettype-none-nodeps/b/dub.sdl (100%) rename test/{ => new_tests}/issue97-targettype-none-nodeps/b/source/app.d (100%) rename test/{ => new_tests}/issue97-targettype-none-nodeps/dub.sdl (58%) create mode 100644 test/new_tests/issue97-targettype-none-nodeps/test.config diff --git a/test/issue97-targettype-none-nodeps/.fail_build b/test/issue97-targettype-none-nodeps/.fail_build deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/issue97-targettype-none-nodeps/.gitignore b/test/issue97-targettype-none-nodeps/.gitignore deleted file mode 100644 index 433d26664a..0000000000 --- a/test/issue97-targettype-none-nodeps/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -.dub -docs.json -__dummy.html -*.o -*.obj diff --git a/test/issue97-targettype-none-nodeps/.no_run b/test/issue97-targettype-none-nodeps/.no_run deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/new_tests/issue97-targettype-none-nodeps/.gitignore b/test/new_tests/issue97-targettype-none-nodeps/.gitignore new file mode 100644 index 0000000000..5f87b5c0cc --- /dev/null +++ b/test/new_tests/issue97-targettype-none-nodeps/.gitignore @@ -0,0 +1,2 @@ +!/a/ +!/b/ \ No newline at end of file diff --git a/test/issue97-targettype-none-nodeps/a/dub.sdl b/test/new_tests/issue97-targettype-none-nodeps/a/dub.sdl similarity index 100% rename from test/issue97-targettype-none-nodeps/a/dub.sdl rename to test/new_tests/issue97-targettype-none-nodeps/a/dub.sdl diff --git a/test/issue97-targettype-none-nodeps/a/source/app.d b/test/new_tests/issue97-targettype-none-nodeps/a/source/app.d similarity index 100% rename from test/issue97-targettype-none-nodeps/a/source/app.d rename to test/new_tests/issue97-targettype-none-nodeps/a/source/app.d diff --git a/test/issue97-targettype-none-nodeps/b/dub.sdl b/test/new_tests/issue97-targettype-none-nodeps/b/dub.sdl similarity index 100% rename from test/issue97-targettype-none-nodeps/b/dub.sdl rename to test/new_tests/issue97-targettype-none-nodeps/b/dub.sdl diff --git a/test/issue97-targettype-none-nodeps/b/source/app.d b/test/new_tests/issue97-targettype-none-nodeps/b/source/app.d similarity index 100% rename from test/issue97-targettype-none-nodeps/b/source/app.d rename to test/new_tests/issue97-targettype-none-nodeps/b/source/app.d diff --git a/test/issue97-targettype-none-nodeps/dub.sdl b/test/new_tests/issue97-targettype-none-nodeps/dub.sdl similarity index 58% rename from test/issue97-targettype-none-nodeps/dub.sdl rename to test/new_tests/issue97-targettype-none-nodeps/dub.sdl index 75bd0bd22a..f9c0cd47ce 100644 --- a/test/issue97-targettype-none-nodeps/dub.sdl +++ b/test/new_tests/issue97-targettype-none-nodeps/dub.sdl @@ -1,4 +1,4 @@ -name "issue97-targettype-none" +name "issue97-targettype-none-nodeps" targetType "none" subPackage "./a/" subPackage "./b/" diff --git a/test/new_tests/issue97-targettype-none-nodeps/test.config b/test/new_tests/issue97-targettype-none-nodeps/test.config new file mode 100644 index 0000000000..e516be9d29 --- /dev/null +++ b/test/new_tests/issue97-targettype-none-nodeps/test.config @@ -0,0 +1,2 @@ +expect_nonzero = true +dub_command = build \ No newline at end of file From c52d4c2a2652dead985ad31094aa9dc0b5d31b44 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 26 Jul 2025 15:35:15 +0300 Subject: [PATCH 155/187] issue97-targettype-none-onerecipe Signed-off-by: Andrei Horodniceanu --- test/issue97-targettype-none-onerecipe/.gitignore | 5 ----- test/issue97-targettype-none-onerecipe/.no_run | 0 test/issue97-targettype-none-onerecipe/.no_test | 0 test/new_tests/issue97-targettype-none-onerecipe/.gitignore | 2 ++ .../issue97-targettype-none-onerecipe/a/source/app.d | 0 .../issue97-targettype-none-onerecipe/b/source/app.d | 0 .../issue97-targettype-none-onerecipe/dub.sdl | 6 +++--- .../new_tests/issue97-targettype-none-onerecipe/test.config | 1 + 8 files changed, 6 insertions(+), 8 deletions(-) delete mode 100644 test/issue97-targettype-none-onerecipe/.gitignore delete mode 100644 test/issue97-targettype-none-onerecipe/.no_run delete mode 100644 test/issue97-targettype-none-onerecipe/.no_test create mode 100644 test/new_tests/issue97-targettype-none-onerecipe/.gitignore rename test/{ => new_tests}/issue97-targettype-none-onerecipe/a/source/app.d (100%) rename test/{ => new_tests}/issue97-targettype-none-onerecipe/b/source/app.d (100%) rename test/{ => new_tests}/issue97-targettype-none-onerecipe/dub.sdl (50%) create mode 100644 test/new_tests/issue97-targettype-none-onerecipe/test.config diff --git a/test/issue97-targettype-none-onerecipe/.gitignore b/test/issue97-targettype-none-onerecipe/.gitignore deleted file mode 100644 index 433d26664a..0000000000 --- a/test/issue97-targettype-none-onerecipe/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -.dub -docs.json -__dummy.html -*.o -*.obj diff --git a/test/issue97-targettype-none-onerecipe/.no_run b/test/issue97-targettype-none-onerecipe/.no_run deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/issue97-targettype-none-onerecipe/.no_test b/test/issue97-targettype-none-onerecipe/.no_test deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/new_tests/issue97-targettype-none-onerecipe/.gitignore b/test/new_tests/issue97-targettype-none-onerecipe/.gitignore new file mode 100644 index 0000000000..02a14fb564 --- /dev/null +++ b/test/new_tests/issue97-targettype-none-onerecipe/.gitignore @@ -0,0 +1,2 @@ +!/a/ +!/b/ diff --git a/test/issue97-targettype-none-onerecipe/a/source/app.d b/test/new_tests/issue97-targettype-none-onerecipe/a/source/app.d similarity index 100% rename from test/issue97-targettype-none-onerecipe/a/source/app.d rename to test/new_tests/issue97-targettype-none-onerecipe/a/source/app.d diff --git a/test/issue97-targettype-none-onerecipe/b/source/app.d b/test/new_tests/issue97-targettype-none-onerecipe/b/source/app.d similarity index 100% rename from test/issue97-targettype-none-onerecipe/b/source/app.d rename to test/new_tests/issue97-targettype-none-onerecipe/b/source/app.d diff --git a/test/issue97-targettype-none-onerecipe/dub.sdl b/test/new_tests/issue97-targettype-none-onerecipe/dub.sdl similarity index 50% rename from test/issue97-targettype-none-onerecipe/dub.sdl rename to test/new_tests/issue97-targettype-none-onerecipe/dub.sdl index 0914715d26..3b855ecda1 100644 --- a/test/issue97-targettype-none-onerecipe/dub.sdl +++ b/test/new_tests/issue97-targettype-none-onerecipe/dub.sdl @@ -1,7 +1,7 @@ -name "issue97-targettype-none" +name "issue97-targettype-none-onerecipe" targetType "none" -dependency "issue97-targettype-none:a" version="*" -dependency "issue97-targettype-none:b" version="*" +dependency "issue97-targettype-none-onerecipe:a" version="*" +dependency "issue97-targettype-none-onerecipe:b" version="*" subPackage { name "a" targetType "executable" diff --git a/test/new_tests/issue97-targettype-none-onerecipe/test.config b/test/new_tests/issue97-targettype-none-onerecipe/test.config new file mode 100644 index 0000000000..4c5009d257 --- /dev/null +++ b/test/new_tests/issue97-targettype-none-onerecipe/test.config @@ -0,0 +1 @@ +dub_command = build \ No newline at end of file From 0af444651c08398e655f1b2ec40a8acc2bf1099e Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 26 Jul 2025 15:38:38 +0300 Subject: [PATCH 156/187] issue990-download-optional-selected Signed-off-by: Andrei Horodniceanu --- test/issue990-download-optional-selected.sh | 7 ------- .../.no_build | 0 .../.gitignore | 6 ++++++ .../issue990-download-optional-selected/dub.json | 8 ++++++++ .../sample}/dub.sdl | 0 .../sample}/dub.selections.json | 0 .../sample}/source/app.d | 0 .../source/app.d | 16 ++++++++++++++++ 8 files changed, 30 insertions(+), 7 deletions(-) delete mode 100755 test/issue990-download-optional-selected.sh delete mode 100644 test/issue990-download-optional-selected/.no_build create mode 100644 test/new_tests/issue990-download-optional-selected/.gitignore create mode 100644 test/new_tests/issue990-download-optional-selected/dub.json rename test/{issue990-download-optional-selected => new_tests/issue990-download-optional-selected/sample}/dub.sdl (100%) rename test/{issue990-download-optional-selected => new_tests/issue990-download-optional-selected/sample}/dub.selections.json (100%) rename test/{issue990-download-optional-selected => new_tests/issue990-download-optional-selected/sample}/source/app.d (100%) create mode 100644 test/new_tests/issue990-download-optional-selected/source/app.d diff --git a/test/issue990-download-optional-selected.sh b/test/issue990-download-optional-selected.sh deleted file mode 100755 index 36fd4ad5bc..0000000000 --- a/test/issue990-download-optional-selected.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash - -. $(dirname "${BASH_SOURCE[0]}")/common.sh -cd ${CURR_DIR}/issue990-download-optional-selected -${DUB} clean -${DUB} remove gitcompatibledubpackage -n 2>/dev/null || true -${DUB} run diff --git a/test/issue990-download-optional-selected/.no_build b/test/issue990-download-optional-selected/.no_build deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/new_tests/issue990-download-optional-selected/.gitignore b/test/new_tests/issue990-download-optional-selected/.gitignore new file mode 100644 index 0000000000..014d651c9e --- /dev/null +++ b/test/new_tests/issue990-download-optional-selected/.gitignore @@ -0,0 +1,6 @@ +/sample/** +!/sample/ +!/sample/dub.sdl +!/sample/dub.selections.json +!/sample/source/ +!/sample/source/*.d diff --git a/test/new_tests/issue990-download-optional-selected/dub.json b/test/new_tests/issue990-download-optional-selected/dub.json new file mode 100644 index 0000000000..0786eca99b --- /dev/null +++ b/test/new_tests/issue990-download-optional-selected/dub.json @@ -0,0 +1,8 @@ +{ + "name": "issue990-download-optional-selected", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/issue990-download-optional-selected/dub.sdl b/test/new_tests/issue990-download-optional-selected/sample/dub.sdl similarity index 100% rename from test/issue990-download-optional-selected/dub.sdl rename to test/new_tests/issue990-download-optional-selected/sample/dub.sdl diff --git a/test/issue990-download-optional-selected/dub.selections.json b/test/new_tests/issue990-download-optional-selected/sample/dub.selections.json similarity index 100% rename from test/issue990-download-optional-selected/dub.selections.json rename to test/new_tests/issue990-download-optional-selected/sample/dub.selections.json diff --git a/test/issue990-download-optional-selected/source/app.d b/test/new_tests/issue990-download-optional-selected/sample/source/app.d similarity index 100% rename from test/issue990-download-optional-selected/source/app.d rename to test/new_tests/issue990-download-optional-selected/sample/source/app.d diff --git a/test/new_tests/issue990-download-optional-selected/source/app.d b/test/new_tests/issue990-download-optional-selected/source/app.d new file mode 100644 index 0000000000..dbc8507c23 --- /dev/null +++ b/test/new_tests/issue990-download-optional-selected/source/app.d @@ -0,0 +1,16 @@ +import common; + +import std.algorithm; +import std.file; +import std.path; +import std.process; + +void main () { + chdir("sample"); + + if (spawnProcess([dub, "clean"]).wait != 0) + die("dub clean failed"); + spawnProcess([dub, "remove", "gitcompatibledubpackage", "-n"]).wait; + if (spawnProcess([dub, "run"]).wait != 0) + die("dub run failed"); +} From c4014a61ac3dbc628c0545c47bc85081ad6b0f22 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 26 Jul 2025 15:40:21 +0300 Subject: [PATCH 157/187] mutex-main-1 Signed-off-by: Andrei Horodniceanu --- test/mutex-main-1/.no_run | 0 test/mutex-main-1/.no_test | 0 test/{ => new_tests}/mutex-main-1/dub.json | 2 +- test/{ => new_tests}/mutex-main-1/source/app.d | 0 test/{ => new_tests}/mutex-main-1/source/app2.d | 0 test/new_tests/mutex-main-1/test.config | 1 + 6 files changed, 2 insertions(+), 1 deletion(-) delete mode 100644 test/mutex-main-1/.no_run delete mode 100644 test/mutex-main-1/.no_test rename test/{ => new_tests}/mutex-main-1/dub.json (94%) rename test/{ => new_tests}/mutex-main-1/source/app.d (100%) rename test/{ => new_tests}/mutex-main-1/source/app2.d (100%) create mode 100644 test/new_tests/mutex-main-1/test.config diff --git a/test/mutex-main-1/.no_run b/test/mutex-main-1/.no_run deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/mutex-main-1/.no_test b/test/mutex-main-1/.no_test deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/mutex-main-1/dub.json b/test/new_tests/mutex-main-1/dub.json similarity index 94% rename from test/mutex-main-1/dub.json rename to test/new_tests/mutex-main-1/dub.json index 882df72339..b07edb61af 100644 --- a/test/mutex-main-1/dub.json +++ b/test/new_tests/mutex-main-1/dub.json @@ -1,6 +1,6 @@ { "description": "A minimal D application.", - "name": "mutex-main", + "name": "mutex-main-1", "targetType": "executable", "configurations": [ diff --git a/test/mutex-main-1/source/app.d b/test/new_tests/mutex-main-1/source/app.d similarity index 100% rename from test/mutex-main-1/source/app.d rename to test/new_tests/mutex-main-1/source/app.d diff --git a/test/mutex-main-1/source/app2.d b/test/new_tests/mutex-main-1/source/app2.d similarity index 100% rename from test/mutex-main-1/source/app2.d rename to test/new_tests/mutex-main-1/source/app2.d diff --git a/test/new_tests/mutex-main-1/test.config b/test/new_tests/mutex-main-1/test.config new file mode 100644 index 0000000000..4c5009d257 --- /dev/null +++ b/test/new_tests/mutex-main-1/test.config @@ -0,0 +1 @@ +dub_command = build \ No newline at end of file From 35647b404b3cfcb63b155af8027343771bfa2ec0 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 26 Jul 2025 15:40:58 +0300 Subject: [PATCH 158/187] mutex-main-2 Signed-off-by: Andrei Horodniceanu --- test/mutex-main-2/.no_run | 0 test/mutex-main-2/.no_test | 0 test/{ => new_tests}/mutex-main-2/dub.json | 2 +- test/{ => new_tests}/mutex-main-2/source/app.d | 0 test/{ => new_tests}/mutex-main-2/source/app2.d | 0 test/new_tests/mutex-main-2/test.config | 1 + 6 files changed, 2 insertions(+), 1 deletion(-) delete mode 100644 test/mutex-main-2/.no_run delete mode 100644 test/mutex-main-2/.no_test rename test/{ => new_tests}/mutex-main-2/dub.json (94%) rename test/{ => new_tests}/mutex-main-2/source/app.d (100%) rename test/{ => new_tests}/mutex-main-2/source/app2.d (100%) create mode 100644 test/new_tests/mutex-main-2/test.config diff --git a/test/mutex-main-2/.no_run b/test/mutex-main-2/.no_run deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/mutex-main-2/.no_test b/test/mutex-main-2/.no_test deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/mutex-main-2/dub.json b/test/new_tests/mutex-main-2/dub.json similarity index 94% rename from test/mutex-main-2/dub.json rename to test/new_tests/mutex-main-2/dub.json index 6ca022b94f..9dd31b6e56 100644 --- a/test/mutex-main-2/dub.json +++ b/test/new_tests/mutex-main-2/dub.json @@ -1,6 +1,6 @@ { "description": "A minimal D application.", - "name": "mutex-main", + "name": "mutex-main-2", "targetType": "executable", "configurations": [ diff --git a/test/mutex-main-2/source/app.d b/test/new_tests/mutex-main-2/source/app.d similarity index 100% rename from test/mutex-main-2/source/app.d rename to test/new_tests/mutex-main-2/source/app.d diff --git a/test/mutex-main-2/source/app2.d b/test/new_tests/mutex-main-2/source/app2.d similarity index 100% rename from test/mutex-main-2/source/app2.d rename to test/new_tests/mutex-main-2/source/app2.d diff --git a/test/new_tests/mutex-main-2/test.config b/test/new_tests/mutex-main-2/test.config new file mode 100644 index 0000000000..4c5009d257 --- /dev/null +++ b/test/new_tests/mutex-main-2/test.config @@ -0,0 +1 @@ +dub_command = build \ No newline at end of file From f9d9eee1ca0e6481da7064e517d0a0ec1be96257 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 26 Jul 2025 15:41:45 +0300 Subject: [PATCH 159/187] mutex-main-3 Signed-off-by: Andrei Horodniceanu --- test/mutex-main-3/.fail_build | 0 test/mutex-main-3/.no_run | 0 test/mutex-main-3/.no_test | 0 test/{ => new_tests}/mutex-main-3/dub.json | 2 +- test/{ => new_tests}/mutex-main-3/source/app.d | 0 test/{ => new_tests}/mutex-main-3/source/app2.d | 0 test/new_tests/mutex-main-3/test.config | 2 ++ 7 files changed, 3 insertions(+), 1 deletion(-) delete mode 100644 test/mutex-main-3/.fail_build delete mode 100644 test/mutex-main-3/.no_run delete mode 100644 test/mutex-main-3/.no_test rename test/{ => new_tests}/mutex-main-3/dub.json (94%) rename test/{ => new_tests}/mutex-main-3/source/app.d (100%) rename test/{ => new_tests}/mutex-main-3/source/app2.d (100%) create mode 100644 test/new_tests/mutex-main-3/test.config diff --git a/test/mutex-main-3/.fail_build b/test/mutex-main-3/.fail_build deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/mutex-main-3/.no_run b/test/mutex-main-3/.no_run deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/mutex-main-3/.no_test b/test/mutex-main-3/.no_test deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/mutex-main-3/dub.json b/test/new_tests/mutex-main-3/dub.json similarity index 94% rename from test/mutex-main-3/dub.json rename to test/new_tests/mutex-main-3/dub.json index c5db1fa204..6bb9620175 100644 --- a/test/mutex-main-3/dub.json +++ b/test/new_tests/mutex-main-3/dub.json @@ -1,6 +1,6 @@ { "description": "A minimal D application.", - "name": "mutex-main", + "name": "mutex-main-3", "targetType": "executable", "configurations": [ diff --git a/test/mutex-main-3/source/app.d b/test/new_tests/mutex-main-3/source/app.d similarity index 100% rename from test/mutex-main-3/source/app.d rename to test/new_tests/mutex-main-3/source/app.d diff --git a/test/mutex-main-3/source/app2.d b/test/new_tests/mutex-main-3/source/app2.d similarity index 100% rename from test/mutex-main-3/source/app2.d rename to test/new_tests/mutex-main-3/source/app2.d diff --git a/test/new_tests/mutex-main-3/test.config b/test/new_tests/mutex-main-3/test.config new file mode 100644 index 0000000000..dad3cd7683 --- /dev/null +++ b/test/new_tests/mutex-main-3/test.config @@ -0,0 +1,2 @@ +dub_command = build +expect_nonzero = true \ No newline at end of file From 796305387c083ee10fb3e1b35672257fee1ce86b Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 26 Jul 2025 15:42:53 +0300 Subject: [PATCH 160/187] path-subpackage-ref Signed-off-by: Andrei Horodniceanu --- test/new_tests/path-subpackage-ref/.gitignore | 1 + test/new_tests/path-subpackage-ref/dub.json | 9 +++++++++ test/{ => new_tests}/path-subpackage-ref/source/app.d | 0 .../{ => new_tests}/path-subpackage-ref/subpack/dub.json | 0 .../path-subpackage-ref/subpack/source/lib.d | 0 test/path-subpackage-ref/dub.json | 9 --------- 6 files changed, 10 insertions(+), 9 deletions(-) create mode 100644 test/new_tests/path-subpackage-ref/.gitignore create mode 100644 test/new_tests/path-subpackage-ref/dub.json rename test/{ => new_tests}/path-subpackage-ref/source/app.d (100%) rename test/{ => new_tests}/path-subpackage-ref/subpack/dub.json (100%) rename test/{ => new_tests}/path-subpackage-ref/subpack/source/lib.d (100%) delete mode 100644 test/path-subpackage-ref/dub.json diff --git a/test/new_tests/path-subpackage-ref/.gitignore b/test/new_tests/path-subpackage-ref/.gitignore new file mode 100644 index 0000000000..516f998760 --- /dev/null +++ b/test/new_tests/path-subpackage-ref/.gitignore @@ -0,0 +1 @@ +!/subpack \ No newline at end of file diff --git a/test/new_tests/path-subpackage-ref/dub.json b/test/new_tests/path-subpackage-ref/dub.json new file mode 100644 index 0000000000..3f953affa8 --- /dev/null +++ b/test/new_tests/path-subpackage-ref/dub.json @@ -0,0 +1,9 @@ +{ + "name": "path-subpackage-ref", + "dependencies": { + "path-subpackage-ref:subpack": "*" + }, + "subPackages": [ + "subpack/" + ] +} diff --git a/test/path-subpackage-ref/source/app.d b/test/new_tests/path-subpackage-ref/source/app.d similarity index 100% rename from test/path-subpackage-ref/source/app.d rename to test/new_tests/path-subpackage-ref/source/app.d diff --git a/test/path-subpackage-ref/subpack/dub.json b/test/new_tests/path-subpackage-ref/subpack/dub.json similarity index 100% rename from test/path-subpackage-ref/subpack/dub.json rename to test/new_tests/path-subpackage-ref/subpack/dub.json diff --git a/test/path-subpackage-ref/subpack/source/lib.d b/test/new_tests/path-subpackage-ref/subpack/source/lib.d similarity index 100% rename from test/path-subpackage-ref/subpack/source/lib.d rename to test/new_tests/path-subpackage-ref/subpack/source/lib.d diff --git a/test/path-subpackage-ref/dub.json b/test/path-subpackage-ref/dub.json deleted file mode 100644 index 4c40d06b0a..0000000000 --- a/test/path-subpackage-ref/dub.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "test", - "dependencies": { - "test:subpack": "*" - }, - "subPackages": [ - "subpack/" - ] -} From c520b36aadbeef1c91afee7b93a5aa084bd72a25 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 26 Jul 2025 15:48:16 +0300 Subject: [PATCH 161/187] pr1549-dub-exe-var Signed-off-by: Andrei Horodniceanu --- test/new_tests/pr1549-dub-exe-var/.gitignore | 6 ++++++ test/new_tests/pr1549-dub-exe-var/dub.json | 8 ++++++++ .../pr1549-dub-exe-var/sample}/dub.sdl | 0 .../pr1549-dub-exe-var/sample}/setmsg.d | 0 .../pr1549-dub-exe-var/sample}/source/app.d | 0 .../new_tests/pr1549-dub-exe-var/source/app.d | 19 +++++++++++++++++++ test/pr1549-dub-exe-var.sh | 11 ----------- test/pr1549-dub-exe-var/.gitignore | 2 -- test/pr1549-dub-exe-var/.no_build | 0 9 files changed, 33 insertions(+), 13 deletions(-) create mode 100644 test/new_tests/pr1549-dub-exe-var/.gitignore create mode 100644 test/new_tests/pr1549-dub-exe-var/dub.json rename test/{pr1549-dub-exe-var => new_tests/pr1549-dub-exe-var/sample}/dub.sdl (100%) rename test/{pr1549-dub-exe-var => new_tests/pr1549-dub-exe-var/sample}/setmsg.d (100%) rename test/{pr1549-dub-exe-var => new_tests/pr1549-dub-exe-var/sample}/source/app.d (100%) create mode 100644 test/new_tests/pr1549-dub-exe-var/source/app.d delete mode 100755 test/pr1549-dub-exe-var.sh delete mode 100644 test/pr1549-dub-exe-var/.gitignore delete mode 100644 test/pr1549-dub-exe-var/.no_build diff --git a/test/new_tests/pr1549-dub-exe-var/.gitignore b/test/new_tests/pr1549-dub-exe-var/.gitignore new file mode 100644 index 0000000000..517a80f7ea --- /dev/null +++ b/test/new_tests/pr1549-dub-exe-var/.gitignore @@ -0,0 +1,6 @@ +/sample/** +!/sample/ +!/sample/dub.sdl +!/sample/setmsg.d +!/sample/source/ +!/sample/source/*.d diff --git a/test/new_tests/pr1549-dub-exe-var/dub.json b/test/new_tests/pr1549-dub-exe-var/dub.json new file mode 100644 index 0000000000..6c3ecbf345 --- /dev/null +++ b/test/new_tests/pr1549-dub-exe-var/dub.json @@ -0,0 +1,8 @@ +{ + "name": "pr1549-dub-exe-var", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/pr1549-dub-exe-var/dub.sdl b/test/new_tests/pr1549-dub-exe-var/sample/dub.sdl similarity index 100% rename from test/pr1549-dub-exe-var/dub.sdl rename to test/new_tests/pr1549-dub-exe-var/sample/dub.sdl diff --git a/test/pr1549-dub-exe-var/setmsg.d b/test/new_tests/pr1549-dub-exe-var/sample/setmsg.d similarity index 100% rename from test/pr1549-dub-exe-var/setmsg.d rename to test/new_tests/pr1549-dub-exe-var/sample/setmsg.d diff --git a/test/pr1549-dub-exe-var/source/app.d b/test/new_tests/pr1549-dub-exe-var/sample/source/app.d similarity index 100% rename from test/pr1549-dub-exe-var/source/app.d rename to test/new_tests/pr1549-dub-exe-var/sample/source/app.d diff --git a/test/new_tests/pr1549-dub-exe-var/source/app.d b/test/new_tests/pr1549-dub-exe-var/source/app.d new file mode 100644 index 0000000000..da35d392a9 --- /dev/null +++ b/test/new_tests/pr1549-dub-exe-var/source/app.d @@ -0,0 +1,19 @@ +import common; + +import std.algorithm; +import std.file; +import std.path; +import std.process; +import std.string; + +void main () { + if (spawnProcess([dub, "build", "--root", "sample"]).wait != 0) + die("dub build failed"); + + auto p = teeProcess(["sample/test-application"]); + if (p.wait != 0) + die("failed running the built application"); + + if (p.stdout.chomp != "modified code") + die("$DUB build variable was (likely) not evaluated correctly"); +} diff --git a/test/pr1549-dub-exe-var.sh b/test/pr1549-dub-exe-var.sh deleted file mode 100755 index 52d41558a0..0000000000 --- a/test/pr1549-dub-exe-var.sh +++ /dev/null @@ -1,11 +0,0 @@ -#! /usr/bin/env bash -set -e - -. $(dirname "${BASH_SOURCE[0]}")/common.sh - -PR1549=$CURR_DIR/pr1549-dub-exe-var - -${DUB} build --root ${PR1549} -OUTPUT=$(${PR1549}/test-application) - -if [[ "$OUTPUT" != "modified code" ]]; then die $LINENO "\$DUB build variable was (likely) not evaluated correctly"; fi diff --git a/test/pr1549-dub-exe-var/.gitignore b/test/pr1549-dub-exe-var/.gitignore deleted file mode 100644 index 964cd1d970..0000000000 --- a/test/pr1549-dub-exe-var/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -setmsg -setmsg.exe diff --git a/test/pr1549-dub-exe-var/.no_build b/test/pr1549-dub-exe-var/.no_build deleted file mode 100644 index e69de29bb2..0000000000 From 1898a21be9fcd326ba3b0391279bd9dac455e9ee Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 26 Jul 2025 15:51:44 +0300 Subject: [PATCH 162/187] pr2642-cache-db Signed-off-by: Andrei Horodniceanu --- test/{ => new_tests}/pr2642-cache-db/dub.sdl | 1 + .../pr2642-cache-db/source/test_cache_db.d | 30 +++++++------------ test/pr2642-cache-db/.gitignore | 2 -- test/pr2642-cache-db/.no_test | 0 4 files changed, 12 insertions(+), 21 deletions(-) rename test/{ => new_tests}/pr2642-cache-db/dub.sdl (56%) rename test/{ => new_tests}/pr2642-cache-db/source/test_cache_db.d (78%) delete mode 100644 test/pr2642-cache-db/.gitignore delete mode 100644 test/pr2642-cache-db/.no_test diff --git a/test/pr2642-cache-db/dub.sdl b/test/new_tests/pr2642-cache-db/dub.sdl similarity index 56% rename from test/pr2642-cache-db/dub.sdl rename to test/new_tests/pr2642-cache-db/dub.sdl index f9fca89bc8..5bd9c5c87c 100644 --- a/test/pr2642-cache-db/dub.sdl +++ b/test/new_tests/pr2642-cache-db/dub.sdl @@ -1,2 +1,3 @@ name "pr2642-cache-db"; targetType "executable"; +dependency "common" path="../common"; diff --git a/test/pr2642-cache-db/source/test_cache_db.d b/test/new_tests/pr2642-cache-db/source/test_cache_db.d similarity index 78% rename from test/pr2642-cache-db/source/test_cache_db.d rename to test/new_tests/pr2642-cache-db/source/test_cache_db.d index 28a2438ac5..fdd61c2169 100644 --- a/test/pr2642-cache-db/source/test_cache_db.d +++ b/test/new_tests/pr2642-cache-db/source/test_cache_db.d @@ -1,5 +1,7 @@ module test_cache_db; +import common; + import std.path; import std.file; import std.process; @@ -8,50 +10,40 @@ import std.json; void main() { - const dubhome = __FILE_FULL_PATH__.dirName().dirName().buildNormalizedPath("dubhome"); - if (exists(dubhome)) + if (exists(dubHome)) { - rmdirRecurse(dubhome); + rmdirRecurse(dubHome); } - const string[string] env = [ - "DUB_HOME": dubhome, - ]; const fetchProgram = [ - environment["DUB"], + dub, "fetch", "gitcompatibledubpackage@1.0.4", ]; - auto dubFetch = spawnProcess(fetchProgram, stdin, stdout, stderr, env); + auto dubFetch = spawnProcess(fetchProgram); wait(dubFetch); const buildProgramLib = [ - environment["DUB"], + dub, "build", "--build=debug", "--config=lib", "gitcompatibledubpackage@1.0.4", ]; - auto dubBuild = spawnProcess(buildProgramLib, stdin, stdout, stderr, env); + auto dubBuild = spawnProcess(buildProgramLib); wait(dubBuild); const buildProgramExe = [ - environment["DUB"], + dub, "build", "--build=debug", "--config=exe", "gitcompatibledubpackage@1.0.4", ]; - dubBuild = spawnProcess(buildProgramExe, stdin, stdout, stderr, env); + dubBuild = spawnProcess(buildProgramExe); wait(dubBuild); - scope (success) - { - // leave dubhome in the tree for analysis in case of failure - rmdirRecurse(dubhome); - } - - const buildDbPath = buildNormalizedPath(dubhome, "cache", "gitcompatibledubpackage", "1.0.4", "db.json"); + const buildDbPath = buildNormalizedPath(dubHome, "cache", "gitcompatibledubpackage", "1.0.4", "db.json"); assert(exists(buildDbPath), buildDbPath ~ " should exist"); const buildDbStr = readText(buildDbPath); auto json = parseJSON(buildDbStr); diff --git a/test/pr2642-cache-db/.gitignore b/test/pr2642-cache-db/.gitignore deleted file mode 100644 index da01cd648d..0000000000 --- a/test/pr2642-cache-db/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -dubhome/ -pr2642-cache-db diff --git a/test/pr2642-cache-db/.no_test b/test/pr2642-cache-db/.no_test deleted file mode 100644 index e69de29bb2..0000000000 From 7f904fe9e5b4612f2deb19c7c9398b0f4ad10c6a Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 26 Jul 2025 15:54:05 +0300 Subject: [PATCH 163/187] pr2644-describe-artifact-path Signed-off-by: Andrei Horodniceanu --- .../pr2644-describe-artifact-path/dub.sdl | 1 + .../source/describe_artifact_path.d | 54 ++++++++++++++++ test/pr2644-describe-artifact-path/.gitignore | 2 - test/pr2644-describe-artifact-path/.no_test | 0 .../source/describe_artifact_path.d | 61 ------------------- 5 files changed, 55 insertions(+), 63 deletions(-) rename test/{ => new_tests}/pr2644-describe-artifact-path/dub.sdl (62%) create mode 100644 test/new_tests/pr2644-describe-artifact-path/source/describe_artifact_path.d delete mode 100644 test/pr2644-describe-artifact-path/.gitignore delete mode 100644 test/pr2644-describe-artifact-path/.no_test delete mode 100644 test/pr2644-describe-artifact-path/source/describe_artifact_path.d diff --git a/test/pr2644-describe-artifact-path/dub.sdl b/test/new_tests/pr2644-describe-artifact-path/dub.sdl similarity index 62% rename from test/pr2644-describe-artifact-path/dub.sdl rename to test/new_tests/pr2644-describe-artifact-path/dub.sdl index 4bb325414d..e083eb2dba 100644 --- a/test/pr2644-describe-artifact-path/dub.sdl +++ b/test/new_tests/pr2644-describe-artifact-path/dub.sdl @@ -1,2 +1,3 @@ name "pr2644-describe-artifact-path"; targetType "executable"; +dependency "common" path="../common"; diff --git a/test/new_tests/pr2644-describe-artifact-path/source/describe_artifact_path.d b/test/new_tests/pr2644-describe-artifact-path/source/describe_artifact_path.d new file mode 100644 index 0000000000..2dd070da83 --- /dev/null +++ b/test/new_tests/pr2644-describe-artifact-path/source/describe_artifact_path.d @@ -0,0 +1,54 @@ +module describe_artifact_path; + +import common; + +import std.path; +import std.file; +import std.process; +import std.stdio; +import std.json; + +void main() +{ + if (exists(dubHome)) + { + rmdirRecurse(dubHome); + } + + const fetchProgram = [ + environment["DUB"], + "fetch", + "gitcompatibledubpackage@1.0.4", + ]; + auto dubFetch = spawnProcess(fetchProgram); + wait(dubFetch); + + const describeProgram = [ + dub, + "describe", + "--build=debug", + "--config=lib", + "gitcompatibledubpackage@1.0.4", + ]; + auto result = execute(describeProgram); + if (result.status != 0) + die("expected dub describe to return zero"); + auto json = parseJSON(result.output); + + auto cacheFile = json["targets"][0]["cacheArtifactPath"].str; + if(exists(cacheFile)) + die("found cache file in virgin dubhome"); + + const buildProgram = [ + dub, + "build", + "--build=debug", + "--config=lib", + "gitcompatibledubpackage@1.0.4", + ]; + auto dubBuild = spawnProcess(buildProgram); + wait(dubBuild); + + if (!exists(cacheFile)) + die("did not find cache file after build"); +} diff --git a/test/pr2644-describe-artifact-path/.gitignore b/test/pr2644-describe-artifact-path/.gitignore deleted file mode 100644 index 0c7a7b4ca6..0000000000 --- a/test/pr2644-describe-artifact-path/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -dubhome/ -pr2644-describe-artifact-path diff --git a/test/pr2644-describe-artifact-path/.no_test b/test/pr2644-describe-artifact-path/.no_test deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/pr2644-describe-artifact-path/source/describe_artifact_path.d b/test/pr2644-describe-artifact-path/source/describe_artifact_path.d deleted file mode 100644 index 0e7b2bb927..0000000000 --- a/test/pr2644-describe-artifact-path/source/describe_artifact_path.d +++ /dev/null @@ -1,61 +0,0 @@ -module describe_artifact_path; - -import std.path; -import std.file; -import std.process; -import std.stdio; -import std.json; - -void main() -{ - const dubhome = __FILE_FULL_PATH__.dirName().dirName().buildNormalizedPath("dubhome"); - if (exists(dubhome)) - { - rmdirRecurse(dubhome); - } - scope (success) - { - // leave dubhome in the tree for analysis in case of failure - rmdirRecurse(dubhome); - } - - const string[string] env = [ - "DUB_HOME": dubhome, - ]; - const fetchProgram = [ - environment["DUB"], - "fetch", - "gitcompatibledubpackage@1.0.4", - ]; - auto dubFetch = spawnProcess(fetchProgram, stdin, stdout, stderr, env); - wait(dubFetch); - - - const describeProgram = [ - environment["DUB"], - "describe", - "--compiler=" ~ environment["DC"], - "--build=debug", - "--config=lib", - "gitcompatibledubpackage@1.0.4", - ]; - auto result = execute(describeProgram, env); - assert(result.status == 0, "expected dub describe to return zero"); - auto json = parseJSON(result.output); - - auto cacheFile = json["targets"][0]["cacheArtifactPath"].str; - assert(!exists(cacheFile), "found cache file in virgin dubhome"); - - const buildProgram = [ - environment["DUB"], - "build", - "--compiler=" ~ environment["DC"], - "--build=debug", - "--config=lib", - "gitcompatibledubpackage@1.0.4", - ]; - auto dubBuild = spawnProcess(buildProgram, stdin, stdout, stderr, env); - wait(dubBuild); - - assert(exists(cacheFile), "did not find cache file after build"); -} From a838c2b29b73eb3b32ddb4fa639b6a5cc4a41178 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 26 Jul 2025 15:58:52 +0300 Subject: [PATCH 164/187] pr2647-build-deep Signed-off-by: Andrei Horodniceanu --- test/new_tests/pr2647-build-deep/.gitignore | 5 ++ .../{ => new_tests}/pr2647-build-deep/dub.sdl | 1 + .../pr2647-build-deep/sample}/dub.sdl | 0 .../pr2647-build-deep/sample}/source/lib.d | 0 .../source/test_build_deep.d | 43 +++++++++++++++ test/pr2647-build-deep/.gitignore | 2 - test/pr2647-build-deep/.no_test | 0 .../source/test_build_deep.d | 53 ------------------- 8 files changed, 49 insertions(+), 55 deletions(-) create mode 100644 test/new_tests/pr2647-build-deep/.gitignore rename test/{ => new_tests}/pr2647-build-deep/dub.sdl (57%) rename test/{pr2647-build-deep/pack => new_tests/pr2647-build-deep/sample}/dub.sdl (100%) rename test/{pr2647-build-deep/pack => new_tests/pr2647-build-deep/sample}/source/lib.d (100%) create mode 100644 test/new_tests/pr2647-build-deep/source/test_build_deep.d delete mode 100644 test/pr2647-build-deep/.gitignore delete mode 100644 test/pr2647-build-deep/.no_test delete mode 100644 test/pr2647-build-deep/source/test_build_deep.d diff --git a/test/new_tests/pr2647-build-deep/.gitignore b/test/new_tests/pr2647-build-deep/.gitignore new file mode 100644 index 0000000000..bb8fca4eea --- /dev/null +++ b/test/new_tests/pr2647-build-deep/.gitignore @@ -0,0 +1,5 @@ +/sample/** +!/sample/ +!/sample/dub.sdl +!/sample/source/ +!/sample/source/*.d \ No newline at end of file diff --git a/test/pr2647-build-deep/dub.sdl b/test/new_tests/pr2647-build-deep/dub.sdl similarity index 57% rename from test/pr2647-build-deep/dub.sdl rename to test/new_tests/pr2647-build-deep/dub.sdl index 639f6d5ab4..eae6b02eb1 100644 --- a/test/pr2647-build-deep/dub.sdl +++ b/test/new_tests/pr2647-build-deep/dub.sdl @@ -1,2 +1,3 @@ name "pr2647-build-deep"; targetType "executable"; +dependency "common" path="../common"; diff --git a/test/pr2647-build-deep/pack/dub.sdl b/test/new_tests/pr2647-build-deep/sample/dub.sdl similarity index 100% rename from test/pr2647-build-deep/pack/dub.sdl rename to test/new_tests/pr2647-build-deep/sample/dub.sdl diff --git a/test/pr2647-build-deep/pack/source/lib.d b/test/new_tests/pr2647-build-deep/sample/source/lib.d similarity index 100% rename from test/pr2647-build-deep/pack/source/lib.d rename to test/new_tests/pr2647-build-deep/sample/source/lib.d diff --git a/test/new_tests/pr2647-build-deep/source/test_build_deep.d b/test/new_tests/pr2647-build-deep/source/test_build_deep.d new file mode 100644 index 0000000000..7bc2d2c3b9 --- /dev/null +++ b/test/new_tests/pr2647-build-deep/source/test_build_deep.d @@ -0,0 +1,43 @@ +module test_build_deep; + +import common; + +import std.array; +import std.file; +import std.path; +import std.process; +import std.stdio; + +void main() +{ + const packdir = getcwd.buildPath("sample"); + + if (exists(dubHome)) + { + rmdirRecurse(dubHome); + } + + // testing the regular way first: `dub build` only builds what is needed + // (urld is downloaded but not built) + const dubBuildProg = [dub, "build"]; + log("running ", dubBuildProg.join(" "), " ..."); + auto dubBuild = spawnProcess(dubBuildProg, null, Config.none, packdir); + wait(dubBuild); + assert(exists(buildPath(dubHome, "cache", "pack"))); + assert(isDir(buildPath(dubHome, "cache", "pack"))); + assert(exists(buildPath(dubHome, "packages", "urld"))); + assert(isDir(buildPath(dubHome, "packages", "urld"))); + assert(!exists(buildPath(dubHome, "cache", "urld"))); + + // now testing the --deep switch: `dub build --deep` will build urld + const dubBuildDeepProg = [dub, "build", "--deep"]; + log("running ", dubBuildDeepProg.join(" "), " ..."); + auto dubBuildDeep = spawnProcess(dubBuildDeepProg, null, Config.none, packdir); + wait(dubBuildDeep); + assert(exists(buildPath(dubHome, "cache", "pack"))); + assert(isDir(buildPath(dubHome, "cache", "pack"))); + assert(exists(buildPath(dubHome, "packages", "urld"))); + assert(isDir(buildPath(dubHome, "packages", "urld"))); + assert(exists(buildPath(dubHome, "cache", "urld"))); + assert(isDir(buildPath(dubHome, "cache", "urld"))); +} diff --git a/test/pr2647-build-deep/.gitignore b/test/pr2647-build-deep/.gitignore deleted file mode 100644 index a71baffd99..0000000000 --- a/test/pr2647-build-deep/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -dubhome/ -pr2647-build-deep diff --git a/test/pr2647-build-deep/.no_test b/test/pr2647-build-deep/.no_test deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/pr2647-build-deep/source/test_build_deep.d b/test/pr2647-build-deep/source/test_build_deep.d deleted file mode 100644 index 79e4a41e37..0000000000 --- a/test/pr2647-build-deep/source/test_build_deep.d +++ /dev/null @@ -1,53 +0,0 @@ -module test_build_deep; - -import std.array; -import std.file; -import std.path; -import std.process; -import std.stdio; - -void main() -{ - const dubhome = __FILE_FULL_PATH__.dirName().dirName().buildNormalizedPath("dubhome"); - const packdir = __FILE_FULL_PATH__.dirName().dirName().buildNormalizedPath("pack"); - const dub = absolutePath(environment["DUB"]); - - if (exists(dubhome)) - { - rmdirRecurse(dubhome); - } - - scope (success) - { - // leave dubhome in the tree for analysis in case of failure - rmdirRecurse(dubhome); - } - - const string[string] env = [ - "DUB_HOME": dubhome, - ]; - - // testing the regular way first: `dub build` only builds what is needed - // (urld is downloaded but not built) - const dubBuildProg = [dub, "build"]; - writefln("running %s ...", dubBuildProg.join(" ")); - auto dubBuild = spawnProcess(dubBuildProg, stdin, stdout, stderr, env, Config.none, packdir); - wait(dubBuild); - assert(exists(buildPath(dubhome, "cache", "pack"))); - assert(isDir(buildPath(dubhome, "cache", "pack"))); - assert(exists(buildPath(dubhome, "packages", "urld"))); - assert(isDir(buildPath(dubhome, "packages", "urld"))); - assert(!exists(buildPath(dubhome, "cache", "urld"))); - - // now testing the --deep switch: `dub build --deep` will build urld - const dubBuildDeepProg = [dub, "build", "--deep"]; - writefln("running %s ...", dubBuildDeepProg.join(" ")); - auto dubBuildDeep = spawnProcess(dubBuildDeepProg, stdin, stdout, stderr, env, Config.none, packdir); - wait(dubBuildDeep); - assert(exists(buildPath(dubhome, "cache", "pack"))); - assert(isDir(buildPath(dubhome, "cache", "pack"))); - assert(exists(buildPath(dubhome, "packages", "urld"))); - assert(isDir(buildPath(dubhome, "packages", "urld"))); - assert(exists(buildPath(dubhome, "cache", "urld"))); - assert(isDir(buildPath(dubhome, "cache", "urld"))); -} From 4dcba07e8219757c0a7c00554a0625977a46cb21 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 26 Jul 2025 16:05:42 +0300 Subject: [PATCH 165/187] removed-dub-obj Signed-off-by: Andrei Horodniceanu --- test/new_tests/removed-dub-obj/.gitignore | 5 ++++ test/new_tests/removed-dub-obj/dub.json | 8 ++++++ .../removed-dub-obj/sample}/dub.sdl | 0 .../removed-dub-obj/sample}/source/test.d | 0 test/new_tests/removed-dub-obj/source/app.d | 28 +++++++++++++++++++ test/removed-dub-obj.sh | 16 ----------- test/removed-dub-obj/.no_build | 0 test/removed-dub-obj/.no_run | 0 test/removed-dub-obj/.no_test | 0 9 files changed, 41 insertions(+), 16 deletions(-) create mode 100644 test/new_tests/removed-dub-obj/.gitignore create mode 100644 test/new_tests/removed-dub-obj/dub.json rename test/{removed-dub-obj => new_tests/removed-dub-obj/sample}/dub.sdl (100%) rename test/{removed-dub-obj => new_tests/removed-dub-obj/sample}/source/test.d (100%) create mode 100644 test/new_tests/removed-dub-obj/source/app.d delete mode 100755 test/removed-dub-obj.sh delete mode 100644 test/removed-dub-obj/.no_build delete mode 100644 test/removed-dub-obj/.no_run delete mode 100644 test/removed-dub-obj/.no_test diff --git a/test/new_tests/removed-dub-obj/.gitignore b/test/new_tests/removed-dub-obj/.gitignore new file mode 100644 index 0000000000..a1ce216fbc --- /dev/null +++ b/test/new_tests/removed-dub-obj/.gitignore @@ -0,0 +1,5 @@ +/sample/** +!/sample/ +!/sample/dub.sdl +!/sample/source/ +!/sample/source/test.d diff --git a/test/new_tests/removed-dub-obj/dub.json b/test/new_tests/removed-dub-obj/dub.json new file mode 100644 index 0000000000..540f15c242 --- /dev/null +++ b/test/new_tests/removed-dub-obj/dub.json @@ -0,0 +1,8 @@ +{ + "name": "removed-dub-obj", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/removed-dub-obj/dub.sdl b/test/new_tests/removed-dub-obj/sample/dub.sdl similarity index 100% rename from test/removed-dub-obj/dub.sdl rename to test/new_tests/removed-dub-obj/sample/dub.sdl diff --git a/test/removed-dub-obj/source/test.d b/test/new_tests/removed-dub-obj/sample/source/test.d similarity index 100% rename from test/removed-dub-obj/source/test.d rename to test/new_tests/removed-dub-obj/sample/source/test.d diff --git a/test/new_tests/removed-dub-obj/source/app.d b/test/new_tests/removed-dub-obj/source/app.d new file mode 100644 index 0000000000..b79833bf4b --- /dev/null +++ b/test/new_tests/removed-dub-obj/source/app.d @@ -0,0 +1,28 @@ +import common; + +import std.algorithm; +import std.file; +import std.path; +import std.process; +import std.range; + +void main () { + chdir("sample"); + + immutable cachePath = dubHome.buildPath("cache", "removed-dub-obj"); + if (exists(cachePath)) rmdirRecurse(cachePath); + + if (spawnProcess([dub, "build"]).wait != 0) + die("dub build failed"); + + if (!exists(cachePath)) + die("The expected ", cachePath, " doesn't exist"); + if (!isDir(cachePath)) + die("The expected ", cachePath, " isn't a directory"); + + immutable numObjecjtFiles = dirEntries(cachePath, "*.o*", SpanMode.depth) + .walkLength; + + if (numObjecjtFiles != 0) + die("Found left-over object files in ", cachePath); +} diff --git a/test/removed-dub-obj.sh b/test/removed-dub-obj.sh deleted file mode 100755 index d767b43e30..0000000000 --- a/test/removed-dub-obj.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env bash - -. $(dirname "${BASH_SOURCE[0]}")/common.sh -cd ${CURR_DIR}/removed-dub-obj - -DUB_CACHE_PATH="$HOME/.dub/cache/removed-dub-obj" - -rm -rf "$DUB_CACHE_PATH" - -${DUB} build --compiler=${DC} - -[ -d "$DUB_CACHE_PATH" ] || die $LINENO "$DUB_CACHE_PATH not found" - -numObjectFiles=$(find "$DUB_CACHE_PATH" -type f -iname '*.o*' | wc -l) -# note: fails with LDC < v1.1 -[ "$numObjectFiles" -eq 0 ] || die $LINENO "Found left-over object files in $DUB_CACHE_PATH" diff --git a/test/removed-dub-obj/.no_build b/test/removed-dub-obj/.no_build deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/removed-dub-obj/.no_run b/test/removed-dub-obj/.no_run deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/removed-dub-obj/.no_test b/test/removed-dub-obj/.no_test deleted file mode 100644 index e69de29bb2..0000000000 From c0d029e33236652804fbfe8da7b8b9f4209846d7 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 26 Jul 2025 16:06:25 +0300 Subject: [PATCH 166/187] sdl-package-simple Signed-off-by: Andrei Horodniceanu --- test/new_tests/sdl-package-simple/dub.sdl | 2 ++ test/{ => new_tests}/sdl-package-simple/source/app.d | 0 test/sdl-package-simple/dub.sdl | 2 -- 3 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 test/new_tests/sdl-package-simple/dub.sdl rename test/{ => new_tests}/sdl-package-simple/source/app.d (100%) delete mode 100644 test/sdl-package-simple/dub.sdl diff --git a/test/new_tests/sdl-package-simple/dub.sdl b/test/new_tests/sdl-package-simple/dub.sdl new file mode 100644 index 0000000000..f128ab18b7 --- /dev/null +++ b/test/new_tests/sdl-package-simple/dub.sdl @@ -0,0 +1,2 @@ +name "sdl-package-simple"; +targetType "executable"; diff --git a/test/sdl-package-simple/source/app.d b/test/new_tests/sdl-package-simple/source/app.d similarity index 100% rename from test/sdl-package-simple/source/app.d rename to test/new_tests/sdl-package-simple/source/app.d diff --git a/test/sdl-package-simple/dub.sdl b/test/sdl-package-simple/dub.sdl deleted file mode 100644 index 78d50b6177..0000000000 --- a/test/sdl-package-simple/dub.sdl +++ /dev/null @@ -1,2 +0,0 @@ -name "exec-simple"; -targetType "executable"; From 5a65476d14d057c91da3bb01d9c08a2cff21d0ae Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 26 Jul 2025 16:10:46 +0300 Subject: [PATCH 167/187] single-file-sdl-default-name Signed-off-by: Andrei Horodniceanu --- .../single-file-sdl-default-name/.gitignore | 1 + .../single-file-sdl-default-name/dub.json | 8 ++++++++ .../single-file-sdl-default-name-sample.d} | 2 +- .../single-file-sdl-default-name/source/app.d | 19 +++++++++++++++++++ test/single-file-sdl-default-name.sh | 11 ----------- 5 files changed, 29 insertions(+), 12 deletions(-) create mode 100644 test/new_tests/single-file-sdl-default-name/.gitignore create mode 100644 test/new_tests/single-file-sdl-default-name/dub.json rename test/{single-file-sdl-default-name.d => new_tests/single-file-sdl-default-name/single-file-sdl-default-name-sample.d} (58%) create mode 100644 test/new_tests/single-file-sdl-default-name/source/app.d delete mode 100755 test/single-file-sdl-default-name.sh diff --git a/test/new_tests/single-file-sdl-default-name/.gitignore b/test/new_tests/single-file-sdl-default-name/.gitignore new file mode 100644 index 0000000000..82099977c4 --- /dev/null +++ b/test/new_tests/single-file-sdl-default-name/.gitignore @@ -0,0 +1 @@ +!/single-file-sdl-default-name-sample.d \ No newline at end of file diff --git a/test/new_tests/single-file-sdl-default-name/dub.json b/test/new_tests/single-file-sdl-default-name/dub.json new file mode 100644 index 0000000000..7e822af42a --- /dev/null +++ b/test/new_tests/single-file-sdl-default-name/dub.json @@ -0,0 +1,8 @@ +{ + "name": "single-file-sdl-default-name", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/single-file-sdl-default-name.d b/test/new_tests/single-file-sdl-default-name/single-file-sdl-default-name-sample.d similarity index 58% rename from test/single-file-sdl-default-name.d rename to test/new_tests/single-file-sdl-default-name/single-file-sdl-default-name-sample.d index e7e7befa1a..22891a33ce 100644 --- a/test/single-file-sdl-default-name.d +++ b/test/new_tests/single-file-sdl-default-name/single-file-sdl-default-name-sample.d @@ -1,5 +1,5 @@ /++dub.sdl: -dependency "sourcelib-simple" path="1-sourceLib-simple" +dependency "sourcelib-simple" path="../extra/1-sourceLib-simple" +/ module single; diff --git a/test/new_tests/single-file-sdl-default-name/source/app.d b/test/new_tests/single-file-sdl-default-name/source/app.d new file mode 100644 index 0000000000..447b333450 --- /dev/null +++ b/test/new_tests/single-file-sdl-default-name/source/app.d @@ -0,0 +1,19 @@ +import common; + +import std.algorithm; +import std.file; +import std.path; +import std.process; + +void main () { + immutable expectedPath = "single-file-sdl-default-name-sample" ~ DotExe; + if (exists(expectedPath)) remove(expectedPath); + + if (spawnProcess([dub, "run", "--single", "single-file-sdl-default-name-sample.d"]).wait != 0) + die("dub run failed"); + + if (!exists(expectedPath)) { + logError("Expected to find file: ", expectedPath); + die("Normal invocation did not produce a binary in the current directory"); + } +} diff --git a/test/single-file-sdl-default-name.sh b/test/single-file-sdl-default-name.sh deleted file mode 100755 index ab2ba8b2cc..0000000000 --- a/test/single-file-sdl-default-name.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bash -set -e -cd ${CURR_DIR} -rm -f single-file-sdl-default-name - -${DUB} run --single single-file-sdl-default-name.d --compiler=${DC} -if [ ! -f single-file-sdl-default-name ]; then - echo "Normal invocation did not produce a binary in the current directory" - exit 1 -fi -rm single-file-sdl-default-name From 8933c006f7b74619ad1c1da1b9591f96779faacb Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 26 Jul 2025 16:16:03 +0300 Subject: [PATCH 168/187] subpackage-common-with-sourcefile-globbing Signed-off-by: Andrei Horodniceanu --- .../.gitignore | 5 +++++ .../dub.json | 8 ++++++++ .../sample}/code/mypackage/client/app.d | 0 .../sample}/code/mypackage/client/extra.d | 0 .../sample}/code/mypackage/common/blah.d | 0 .../sample}/code/mypackage/server/app.d | 0 .../sample}/code/mypackage/server/extra.d | 0 .../sample}/dub.sdl | 0 .../source/app.d | 15 +++++++++++++++ .../subpackage-common-with-sourcefile-globbing.sh | 8 -------- .../.no_build | 0 11 files changed, 28 insertions(+), 8 deletions(-) create mode 100644 test/new_tests/subpackage-common-with-sourcefile-globbing/.gitignore create mode 100644 test/new_tests/subpackage-common-with-sourcefile-globbing/dub.json rename test/{subpackage-common-with-sourcefile-globbing => new_tests/subpackage-common-with-sourcefile-globbing/sample}/code/mypackage/client/app.d (100%) rename test/{subpackage-common-with-sourcefile-globbing => new_tests/subpackage-common-with-sourcefile-globbing/sample}/code/mypackage/client/extra.d (100%) rename test/{subpackage-common-with-sourcefile-globbing => new_tests/subpackage-common-with-sourcefile-globbing/sample}/code/mypackage/common/blah.d (100%) rename test/{subpackage-common-with-sourcefile-globbing => new_tests/subpackage-common-with-sourcefile-globbing/sample}/code/mypackage/server/app.d (100%) rename test/{subpackage-common-with-sourcefile-globbing => new_tests/subpackage-common-with-sourcefile-globbing/sample}/code/mypackage/server/extra.d (100%) rename test/{subpackage-common-with-sourcefile-globbing => new_tests/subpackage-common-with-sourcefile-globbing/sample}/dub.sdl (100%) create mode 100644 test/new_tests/subpackage-common-with-sourcefile-globbing/source/app.d delete mode 100755 test/subpackage-common-with-sourcefile-globbing.sh delete mode 100644 test/subpackage-common-with-sourcefile-globbing/.no_build diff --git a/test/new_tests/subpackage-common-with-sourcefile-globbing/.gitignore b/test/new_tests/subpackage-common-with-sourcefile-globbing/.gitignore new file mode 100644 index 0000000000..f3ccceceb2 --- /dev/null +++ b/test/new_tests/subpackage-common-with-sourcefile-globbing/.gitignore @@ -0,0 +1,5 @@ +/sample/** +!/sample/ +!/sample/dub.sdl +!/sample/code/ +!/sample/code/** diff --git a/test/new_tests/subpackage-common-with-sourcefile-globbing/dub.json b/test/new_tests/subpackage-common-with-sourcefile-globbing/dub.json new file mode 100644 index 0000000000..7f06dab666 --- /dev/null +++ b/test/new_tests/subpackage-common-with-sourcefile-globbing/dub.json @@ -0,0 +1,8 @@ +{ + "name": "subpackage-common-with-sourcefile-globbing", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/subpackage-common-with-sourcefile-globbing/code/mypackage/client/app.d b/test/new_tests/subpackage-common-with-sourcefile-globbing/sample/code/mypackage/client/app.d similarity index 100% rename from test/subpackage-common-with-sourcefile-globbing/code/mypackage/client/app.d rename to test/new_tests/subpackage-common-with-sourcefile-globbing/sample/code/mypackage/client/app.d diff --git a/test/subpackage-common-with-sourcefile-globbing/code/mypackage/client/extra.d b/test/new_tests/subpackage-common-with-sourcefile-globbing/sample/code/mypackage/client/extra.d similarity index 100% rename from test/subpackage-common-with-sourcefile-globbing/code/mypackage/client/extra.d rename to test/new_tests/subpackage-common-with-sourcefile-globbing/sample/code/mypackage/client/extra.d diff --git a/test/subpackage-common-with-sourcefile-globbing/code/mypackage/common/blah.d b/test/new_tests/subpackage-common-with-sourcefile-globbing/sample/code/mypackage/common/blah.d similarity index 100% rename from test/subpackage-common-with-sourcefile-globbing/code/mypackage/common/blah.d rename to test/new_tests/subpackage-common-with-sourcefile-globbing/sample/code/mypackage/common/blah.d diff --git a/test/subpackage-common-with-sourcefile-globbing/code/mypackage/server/app.d b/test/new_tests/subpackage-common-with-sourcefile-globbing/sample/code/mypackage/server/app.d similarity index 100% rename from test/subpackage-common-with-sourcefile-globbing/code/mypackage/server/app.d rename to test/new_tests/subpackage-common-with-sourcefile-globbing/sample/code/mypackage/server/app.d diff --git a/test/subpackage-common-with-sourcefile-globbing/code/mypackage/server/extra.d b/test/new_tests/subpackage-common-with-sourcefile-globbing/sample/code/mypackage/server/extra.d similarity index 100% rename from test/subpackage-common-with-sourcefile-globbing/code/mypackage/server/extra.d rename to test/new_tests/subpackage-common-with-sourcefile-globbing/sample/code/mypackage/server/extra.d diff --git a/test/subpackage-common-with-sourcefile-globbing/dub.sdl b/test/new_tests/subpackage-common-with-sourcefile-globbing/sample/dub.sdl similarity index 100% rename from test/subpackage-common-with-sourcefile-globbing/dub.sdl rename to test/new_tests/subpackage-common-with-sourcefile-globbing/sample/dub.sdl diff --git a/test/new_tests/subpackage-common-with-sourcefile-globbing/source/app.d b/test/new_tests/subpackage-common-with-sourcefile-globbing/source/app.d new file mode 100644 index 0000000000..ea32e48533 --- /dev/null +++ b/test/new_tests/subpackage-common-with-sourcefile-globbing/source/app.d @@ -0,0 +1,15 @@ +import common; + +import std.algorithm; +import std.file; +import std.path; +import std.process; + +void main () { + chdir("sample"); + + foreach (subpkg; ["server", "client", "common"]) { + if (spawnProcess([dub, "build", ":" ~ subpkg, "-v"]).wait != 0) + die("dub build :", subpkg, " failed"); + } +} diff --git a/test/subpackage-common-with-sourcefile-globbing.sh b/test/subpackage-common-with-sourcefile-globbing.sh deleted file mode 100755 index 1341acc0d4..0000000000 --- a/test/subpackage-common-with-sourcefile-globbing.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -set -e - -cd ${CURR_DIR}/subpackage-common-with-sourcefile-globbing -rm -rf .dub dub.selections.json -${DUB} build --compiler=${DC} :server -v -${DUB} build --compiler=${DC} :client -v -${DUB} build --compiler=${DC} :common -v diff --git a/test/subpackage-common-with-sourcefile-globbing/.no_build b/test/subpackage-common-with-sourcefile-globbing/.no_build deleted file mode 100644 index e69de29bb2..0000000000 From 1d80c2d966b296343bd96f086c24075820b23af0 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 26 Jul 2025 16:17:19 +0300 Subject: [PATCH 169/187] subpackage-ref Signed-off-by: Andrei Horodniceanu --- test/{ => new_tests}/subpackage-ref/dub.json | 4 ++-- test/{ => new_tests}/subpackage-ref/source/app.d | 0 2 files changed, 2 insertions(+), 2 deletions(-) rename test/{ => new_tests}/subpackage-ref/dub.json (56%) rename test/{ => new_tests}/subpackage-ref/source/app.d (100%) diff --git a/test/subpackage-ref/dub.json b/test/new_tests/subpackage-ref/dub.json similarity index 56% rename from test/subpackage-ref/dub.json rename to test/new_tests/subpackage-ref/dub.json index b840a09aa4..356130fc1c 100644 --- a/test/subpackage-ref/dub.json +++ b/test/new_tests/subpackage-ref/dub.json @@ -1,7 +1,7 @@ { - "name": "test", + "name": "subpackage-ref", "dependencies": { - "test:subpack": "*" + "subpackage-ref:subpack": "*" }, "subPackages": [ { diff --git a/test/subpackage-ref/source/app.d b/test/new_tests/subpackage-ref/source/app.d similarity index 100% rename from test/subpackage-ref/source/app.d rename to test/new_tests/subpackage-ref/source/app.d From 0fd135534b95cf41bbe5585f9d9cec0095af979c Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 26 Jul 2025 17:25:20 +0300 Subject: [PATCH 170/187] test-upgrade-subpackages Signed-off-by: Andrei Horodniceanu --- .../test-upgrade-subpackages/.gitignore | 9 ++++++ .../test-upgrade-subpackages/dub.json | 8 +++++ .../test-upgrade-subpackages/sample/dub.json | 9 ++++++ .../sample/source/app.d | 7 +++++ .../sample/subpack/dub.json | 8 +++++ .../sample/subpack/source/lib.d | 6 ++++ .../test-upgrade-subpackages/source/app.d | 30 +++++++++++++++++++ test/test-upgrade-subpackages.sh | 29 ------------------ 8 files changed, 77 insertions(+), 29 deletions(-) create mode 100644 test/new_tests/test-upgrade-subpackages/.gitignore create mode 100644 test/new_tests/test-upgrade-subpackages/dub.json create mode 100644 test/new_tests/test-upgrade-subpackages/sample/dub.json create mode 100644 test/new_tests/test-upgrade-subpackages/sample/source/app.d create mode 100644 test/new_tests/test-upgrade-subpackages/sample/subpack/dub.json create mode 100644 test/new_tests/test-upgrade-subpackages/sample/subpack/source/lib.d create mode 100644 test/new_tests/test-upgrade-subpackages/source/app.d delete mode 100755 test/test-upgrade-subpackages.sh diff --git a/test/new_tests/test-upgrade-subpackages/.gitignore b/test/new_tests/test-upgrade-subpackages/.gitignore new file mode 100644 index 0000000000..0c7cb9839b --- /dev/null +++ b/test/new_tests/test-upgrade-subpackages/.gitignore @@ -0,0 +1,9 @@ +/sample/** +!/sample/ +!/sample/dub.json +!/sample/source/ +!/sample/source/*.d +!/sample/subpack/ +!/sample/subpack/dub.json +!/sample/subpack/source/ +!/sample/subpack/source/*.d diff --git a/test/new_tests/test-upgrade-subpackages/dub.json b/test/new_tests/test-upgrade-subpackages/dub.json new file mode 100644 index 0000000000..ce37943747 --- /dev/null +++ b/test/new_tests/test-upgrade-subpackages/dub.json @@ -0,0 +1,8 @@ +{ + "name": "test-upgrade-subpackages", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/new_tests/test-upgrade-subpackages/sample/dub.json b/test/new_tests/test-upgrade-subpackages/sample/dub.json new file mode 100644 index 0000000000..b5eee24382 --- /dev/null +++ b/test/new_tests/test-upgrade-subpackages/sample/dub.json @@ -0,0 +1,9 @@ +{ + "name": "test-upgrade-subpackages-sample", + "dependencies": { + "test-upgrade-subpackages-sample:subpack": "*" + }, + "subPackages": [ + "subpack/" + ] +} diff --git a/test/new_tests/test-upgrade-subpackages/sample/source/app.d b/test/new_tests/test-upgrade-subpackages/sample/source/app.d new file mode 100644 index 0000000000..6dc0376637 --- /dev/null +++ b/test/new_tests/test-upgrade-subpackages/sample/source/app.d @@ -0,0 +1,7 @@ +module app; +import lib; + +void main() +{ + libFunc(); +} diff --git a/test/new_tests/test-upgrade-subpackages/sample/subpack/dub.json b/test/new_tests/test-upgrade-subpackages/sample/subpack/dub.json new file mode 100644 index 0000000000..6c11e39985 --- /dev/null +++ b/test/new_tests/test-upgrade-subpackages/sample/subpack/dub.json @@ -0,0 +1,8 @@ +{ + "name": "subpack", + "description": "A minimal D application.", + "copyright": "Copyright © 2014, sludwig", + "authors": ["sludwig"], + "dependencies": { + } +} diff --git a/test/new_tests/test-upgrade-subpackages/sample/subpack/source/lib.d b/test/new_tests/test-upgrade-subpackages/sample/subpack/source/lib.d new file mode 100644 index 0000000000..a49c81712f --- /dev/null +++ b/test/new_tests/test-upgrade-subpackages/sample/subpack/source/lib.d @@ -0,0 +1,6 @@ +import std.stdio; + +void libFunc() +{ + writeln("Library function called."); +} diff --git a/test/new_tests/test-upgrade-subpackages/source/app.d b/test/new_tests/test-upgrade-subpackages/source/app.d new file mode 100644 index 0000000000..7796d77721 --- /dev/null +++ b/test/new_tests/test-upgrade-subpackages/source/app.d @@ -0,0 +1,30 @@ +import common; + +import std.algorithm; +import std.file; +import std.path; +import std.process; + +void main () { + chdir("sample"); + + // make sure that there are no left-over selections files + foreach (file; ["dub.selections.json", "subpack/dub.selections.json"]) + if (exists(file)) remove(file); + + // first upgrade only the root package + if (spawnProcess([dub, "upgrade"]).wait != 0) + die("The upgrade command failed."); + + if (!exists("dub.selections.json") || exists("subpack/dub.selections.json")) + die("The upgrade command did not generate the right set of dub.selections.json files."); + + remove("dub.selections.json"); + + // now upgrade with all sub packages + if (spawnProcess([dub, "upgrade", "-s"]).wait != 0) + die("The upgrade command failed with -s."); + + if (!exists("dub.selections.json") || !exists("subpack/dub.selections.json")) + die("The upgrade command did not generate all dub.selections.json files."); +} diff --git a/test/test-upgrade-subpackages.sh b/test/test-upgrade-subpackages.sh deleted file mode 100755 index 860e68681f..0000000000 --- a/test/test-upgrade-subpackages.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env bash - -. $(dirname ${BASH_SOURCE[0]})/common.sh - -PACK_PATH="$CURR_DIR"/path-subpackage-ref - -# make sure that there are no left-over selections files -rm -f $PACK_PATH/dub.selections.json $PACK_PATH/subpack/dub.selections.json - -# first upgrade only the root package -if ! ${DUB} upgrade --root $PACK_PATH; then - die $LINENO 'The upgrade command failed.' -fi -if [ ! -f $PACK_PATH/dub.selections.json ] || [ -f $PACK_PATH/subpack/dub.selections.json ]; then - die $LINENO 'The upgrade command did not generate the right set of dub.selections.json files.' -fi - -rm -f $PACK_PATH/dub.selections.json - -# now upgrade with all sub packages -if ! ${DUB} upgrade -s --root $PACK_PATH; then - die $LINENO 'The upgrade command failed with -s.' -fi -if [ ! -f $PACK_PATH/dub.selections.json ] || [ ! -f $PACK_PATH/subpack/dub.selections.json ]; then - die $LINENO 'The upgrade command did not generate all dub.selections.json files.' -fi - -# clean up -rm -f $PACK_PATH/dub.selections.json $PACK_PATH/subpack/dub.selections.json From 1da2f1988de2bbb20b453394546c731439716a33 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 26 Jul 2025 17:28:05 +0300 Subject: [PATCH 171/187] test-version-opt Signed-off-by: Andrei Horodniceanu --- test/new_tests/test-version-opt/dub.json | 8 ++++++++ test/new_tests/test-version-opt/source/app.d | 14 ++++++++++++++ test/test-version-opt.sh | 4 ---- 3 files changed, 22 insertions(+), 4 deletions(-) create mode 100644 test/new_tests/test-version-opt/dub.json create mode 100644 test/new_tests/test-version-opt/source/app.d delete mode 100755 test/test-version-opt.sh diff --git a/test/new_tests/test-version-opt/dub.json b/test/new_tests/test-version-opt/dub.json new file mode 100644 index 0000000000..2e972c0c3b --- /dev/null +++ b/test/new_tests/test-version-opt/dub.json @@ -0,0 +1,8 @@ +{ + "name": "test-version-opt", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/new_tests/test-version-opt/source/app.d b/test/new_tests/test-version-opt/source/app.d new file mode 100644 index 0000000000..21d9352a62 --- /dev/null +++ b/test/new_tests/test-version-opt/source/app.d @@ -0,0 +1,14 @@ +import common; + +import std.algorithm; +import std.file; +import std.path; +import std.process; + +void main () { + auto p = teeProcess([dub, "--version"], Redirect.stdout); + if (p.pid.wait != 0) + die("dub --version failed"); + if (!p.stdout.canFind("DUB version")) + die("dub --version did not contain 'DUB version'"); +} diff --git a/test/test-version-opt.sh b/test/test-version-opt.sh deleted file mode 100755 index 3abf31be6f..0000000000 --- a/test/test-version-opt.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env bash - -. $(dirname "${BASH_SOURCE[0]}")/common.sh -$DUB --version | grep -qF 'DUB version' From 4a6b9a3b4b114b852677f4d260958f2238cdf939 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 26 Jul 2025 18:24:52 +0300 Subject: [PATCH 172/187] timeout Signed-off-by: Andrei Horodniceanu --- test/new_tests/timeout/dub.json | 8 +++ test/new_tests/timeout/source/app.d | 100 ++++++++++++++++++++++++++++ test/timeout.sh | 44 ------------ 3 files changed, 108 insertions(+), 44 deletions(-) create mode 100644 test/new_tests/timeout/dub.json create mode 100644 test/new_tests/timeout/source/app.d delete mode 100755 test/timeout.sh diff --git a/test/new_tests/timeout/dub.json b/test/new_tests/timeout/dub.json new file mode 100644 index 0000000000..0757973f92 --- /dev/null +++ b/test/new_tests/timeout/dub.json @@ -0,0 +1,8 @@ +{ + "name": "timeout", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/new_tests/timeout/source/app.d b/test/new_tests/timeout/source/app.d new file mode 100644 index 0000000000..d286cbf77c --- /dev/null +++ b/test/new_tests/timeout/source/app.d @@ -0,0 +1,100 @@ +import common; + +import core.thread.osthread; +import core.time; +import std.algorithm; +import std.file; +import std.path; +import std.process; +import std.stdio; + +void main () { + immutable port = getRandomPort(); + immutable cmd = [ + dub, + "fetch", + "dub", + "--skip-registry=all", + // a port that shouldn't be occupied + "--registry=http://localhost:" ~ port, + ]; + + // FIXME windows waits the full 8 seconds before stopping + version(Posix) {{ + log("Testing unconnectable registry"); + auto p = spawnProcess(cmd); + scope(exit) p.stop; + + Thread.sleep(1.seconds); + if (!p.tryWait.terminated) + die("Fetching from unconnectable registry should fail immediately."); + if (p.wait == 0) + die("Fetching from unconnectable registry should fail."); + }} + + try { + execute("nc"); + } catch (ProcessException) { + log("Skipping the rests of these tests as they require `nc`"); + return; + } + + { + log("Testing non-responding registry"); + auto nc = pipeProcess(["nc", "-l", port]); + scope(exit) stop(nc.pid); + nc.stdin.close(); + + auto p = spawnProcess(cmd); + scope(exit) p.stop; + + Thread.sleep(10.seconds); + + if (!p.tryWait.terminated) + die("Fetching from non-responding registry should fail."); + if (p.wait == 0) + die("Fetching from non-responding registry should fail."); + } + + { + log("Testing too slow registry"); + auto nc = pipeProcess(["nc", "-l", port]); + scope(exit) stop(nc.pid); + + nc.stdin.write("HTTP/1.1 200 OK\r\n"); + nc.stdin.write("Server: dummy\r\n"); + nc.stdin.write("Content-Type: application/json\r\n"); + nc.stdin.write("Content-Length: 2\r\n"); + nc.stdin.write("\r\n"); + // Simulate slow response + //nc.stdin.write("{}"); + + // SEGV without this ?? + nc.stdin.flush(); + + auto p = spawnProcess(cmd); + scope(exit) p.stop; + + Thread.sleep(10.seconds); + + if (!p.tryWait.terminated) + die("Fetching from too slow registry should time-out within 8s."); + if (p.wait == 0) + die("Fetching from non-responding registry should fail."); + } +} + +string getRandomPort() { + auto result = cast(ushort)(thisProcessID % ushort.max); + if (result < 1024) + result += 1025; + import std.conv; + return text(result); +} + +void stop(Pid pid) { + scope(exit) pid.wait; + try { + pid.kill; + } catch (Exception) {} +} diff --git a/test/timeout.sh b/test/timeout.sh deleted file mode 100755 index 746b0aafc7..0000000000 --- a/test/timeout.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -. $(dirname "${BASH_SOURCE[0]}")/common.sh - -PORT=$(getRandomPort) - -log ' Testing unconnectable registry' -if timeout 1s $DUB fetch dub --skip-registry=all --registry=http://localhost:$PORT; then - die $LINENO 'Fetching from unconnectable registry should fail.' -elif [ $? -eq 124 ]; then - die $LINENO 'Fetching from unconnectable registry should fail immediately.' -fi - -log ' Testing non-responding registry' -cat | nc -l $PORT >/dev/null & -PID=$! -if timeout 10s $DUB fetch dub --skip-registry=all --registry=http://localhost:$PORT; then - die $LINENO 'Fetching from non-responding registry should fail.' -elif [ $? -eq 124 ]; then - die $LINENO 'Fetching from non-responding registry should time-out within 8s.' -fi -kill $PID 2>/dev/null || true - -log ' Testing too slow registry' -{ - res=$(printf 'HTTP/1.1 200 OK\r -Server: dummy\r -Content-Type: application/json\r -Content-Length: 2\r -\r -{}') - for i in $(seq 0 $((${#res} - 1))); do - echo -n "${res:$i:1}" || true - sleep 1 - done -} | tail -n +1 | nc -l $PORT >/dev/null & -PID=$! -if timeout 10s time $DUB fetch dub --skip-registry=all --registry=http://localhost:$PORT; then - die $LINENO 'Fetching from too slow registry should fail.' -elif [ $? -eq 124 ]; then - die $LINENO 'Fetching from too slow registry should time-out within 8s.' -fi -kill $PID 2>/dev/null || true From 8cea7b961d0eb7469043998b67b76820fda66f59 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 26 Jul 2025 18:26:36 +0300 Subject: [PATCH 173/187] unittest-cov-ctfe Signed-off-by: Andrei Horodniceanu --- test/{ => new_tests}/unittest-cov-ctfe/dub.sdl | 2 +- test/{ => new_tests}/unittest-cov-ctfe/source/mod.d | 0 test/new_tests/unittest-cov-ctfe/test.config | 4 ++++ test/unittest-cov-ctfe.sh | 5 ----- test/unittest-cov-ctfe/.no_build | 0 test/unittest-cov-ctfe/.no_run | 0 test/unittest-cov-ctfe/.no_test | 0 7 files changed, 5 insertions(+), 6 deletions(-) rename test/{ => new_tests}/unittest-cov-ctfe/dub.sdl (68%) rename test/{ => new_tests}/unittest-cov-ctfe/source/mod.d (100%) create mode 100644 test/new_tests/unittest-cov-ctfe/test.config delete mode 100755 test/unittest-cov-ctfe.sh delete mode 100644 test/unittest-cov-ctfe/.no_build delete mode 100644 test/unittest-cov-ctfe/.no_run delete mode 100644 test/unittest-cov-ctfe/.no_test diff --git a/test/unittest-cov-ctfe/dub.sdl b/test/new_tests/unittest-cov-ctfe/dub.sdl similarity index 68% rename from test/unittest-cov-ctfe/dub.sdl rename to test/new_tests/unittest-cov-ctfe/dub.sdl index de485d0ab1..751b9a6083 100644 --- a/test/unittest-cov-ctfe/dub.sdl +++ b/test/new_tests/unittest-cov-ctfe/dub.sdl @@ -1,4 +1,4 @@ -name "test" +name "unittest-cov-ctfe" version "1.0.0" targetType "library" dflags "-cov=100" diff --git a/test/unittest-cov-ctfe/source/mod.d b/test/new_tests/unittest-cov-ctfe/source/mod.d similarity index 100% rename from test/unittest-cov-ctfe/source/mod.d rename to test/new_tests/unittest-cov-ctfe/source/mod.d diff --git a/test/new_tests/unittest-cov-ctfe/test.config b/test/new_tests/unittest-cov-ctfe/test.config new file mode 100644 index 0000000000..5c69b16675 --- /dev/null +++ b/test/new_tests/unittest-cov-ctfe/test.config @@ -0,0 +1,4 @@ +dub_command = test +dub_build_type = unittest-cov-ctfe +# no -cov=ctfe switch for gdmd +dc_backend = [dmd, ldc] diff --git a/test/unittest-cov-ctfe.sh b/test/unittest-cov-ctfe.sh deleted file mode 100755 index a97a262ca5..0000000000 --- a/test/unittest-cov-ctfe.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash - -DIR=$(dirname "${BASH_SOURCE[0]}") -. "$DIR"/common.sh -"$DUB" test --root "$DIR"/unittest-cov-ctfe --build=unittest-cov-ctfe diff --git a/test/unittest-cov-ctfe/.no_build b/test/unittest-cov-ctfe/.no_build deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/unittest-cov-ctfe/.no_run b/test/unittest-cov-ctfe/.no_run deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/unittest-cov-ctfe/.no_test b/test/unittest-cov-ctfe/.no_test deleted file mode 100644 index e69de29bb2..0000000000 From 5be9655e1be61e46ff61e49e27584263be0f3f7c Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 26 Jul 2025 18:29:20 +0300 Subject: [PATCH 174/187] use-c-sources Signed-off-by: Andrei Horodniceanu --- test/{ => new_tests}/use-c-sources/dub.json | 0 test/{ => new_tests}/use-c-sources/source/app.d | 0 test/{ => new_tests}/use-c-sources/source/some_c_code.c | 0 test/{ => new_tests}/use-c-sources/source/some_c_code.h | 0 test/new_tests/use-c-sources/test.config | 3 +++ test/use-c-sources/.min_frontend | 1 - test/use-c-sources/.no_build_gdc | 0 7 files changed, 3 insertions(+), 1 deletion(-) rename test/{ => new_tests}/use-c-sources/dub.json (100%) rename test/{ => new_tests}/use-c-sources/source/app.d (100%) rename test/{ => new_tests}/use-c-sources/source/some_c_code.c (100%) rename test/{ => new_tests}/use-c-sources/source/some_c_code.h (100%) create mode 100644 test/new_tests/use-c-sources/test.config delete mode 100644 test/use-c-sources/.min_frontend delete mode 100644 test/use-c-sources/.no_build_gdc diff --git a/test/use-c-sources/dub.json b/test/new_tests/use-c-sources/dub.json similarity index 100% rename from test/use-c-sources/dub.json rename to test/new_tests/use-c-sources/dub.json diff --git a/test/use-c-sources/source/app.d b/test/new_tests/use-c-sources/source/app.d similarity index 100% rename from test/use-c-sources/source/app.d rename to test/new_tests/use-c-sources/source/app.d diff --git a/test/use-c-sources/source/some_c_code.c b/test/new_tests/use-c-sources/source/some_c_code.c similarity index 100% rename from test/use-c-sources/source/some_c_code.c rename to test/new_tests/use-c-sources/source/some_c_code.c diff --git a/test/use-c-sources/source/some_c_code.h b/test/new_tests/use-c-sources/source/some_c_code.h similarity index 100% rename from test/use-c-sources/source/some_c_code.h rename to test/new_tests/use-c-sources/source/some_c_code.h diff --git a/test/new_tests/use-c-sources/test.config b/test/new_tests/use-c-sources/test.config new file mode 100644 index 0000000000..47e72f5625 --- /dev/null +++ b/test/new_tests/use-c-sources/test.config @@ -0,0 +1,3 @@ +dlang_fe_version_min = 2101 +# no #include for gdc +dc_backend = [dmd, ldc] \ No newline at end of file diff --git a/test/use-c-sources/.min_frontend b/test/use-c-sources/.min_frontend deleted file mode 100644 index 1dbb4ffb0a..0000000000 --- a/test/use-c-sources/.min_frontend +++ /dev/null @@ -1 +0,0 @@ -2.101 diff --git a/test/use-c-sources/.no_build_gdc b/test/use-c-sources/.no_build_gdc deleted file mode 100644 index e69de29bb2..0000000000 From 81a9ccfe7b8d32125818ab3821b47dc29af463c9 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 26 Jul 2025 18:38:33 +0300 Subject: [PATCH 175/187] version-filters Signed-off-by: Andrei Horodniceanu --- test/new_tests/version-filters/.gitignore | 2 ++ .../version-filters/daughter/dub.sdl | 2 +- .../version-filters/daughter/source/dummy.d | 0 test/{ => new_tests}/version-filters/dub.sdl | 4 ++-- test/{ => new_tests}/version-filters/son/dub.sdl | 2 +- .../version-filters/son/source/dummy.d | 0 test/{ => new_tests}/version-filters/source/app.d | 0 test/new_tests/version-filters/test.config | 2 ++ test/version-filters/.gitignore | 15 --------------- test/version-filters/.no_build | 0 test/version-filters/.no_run | 0 test/version-filters/.no_test | 0 test/version-filters/daughter/.gitignore | 14 -------------- test/version-filters/son/.gitignore | 14 -------------- 14 files changed, 8 insertions(+), 47 deletions(-) create mode 100644 test/new_tests/version-filters/.gitignore rename test/{ => new_tests}/version-filters/daughter/dub.sdl (79%) rename test/{ => new_tests}/version-filters/daughter/source/dummy.d (100%) rename test/{ => new_tests}/version-filters/dub.sdl (55%) rename test/{ => new_tests}/version-filters/son/dub.sdl (76%) rename test/{ => new_tests}/version-filters/son/source/dummy.d (100%) rename test/{ => new_tests}/version-filters/source/app.d (100%) create mode 100644 test/new_tests/version-filters/test.config delete mode 100644 test/version-filters/.gitignore delete mode 100644 test/version-filters/.no_build delete mode 100644 test/version-filters/.no_run delete mode 100644 test/version-filters/.no_test delete mode 100644 test/version-filters/daughter/.gitignore delete mode 100644 test/version-filters/son/.gitignore diff --git a/test/new_tests/version-filters/.gitignore b/test/new_tests/version-filters/.gitignore new file mode 100644 index 0000000000..e6e221b63f --- /dev/null +++ b/test/new_tests/version-filters/.gitignore @@ -0,0 +1,2 @@ +!/son/ +!/daughter \ No newline at end of file diff --git a/test/version-filters/daughter/dub.sdl b/test/new_tests/version-filters/daughter/dub.sdl similarity index 79% rename from test/version-filters/daughter/dub.sdl rename to test/new_tests/version-filters/daughter/dub.sdl index 7eb94da3fa..8b41b3c13a 100644 --- a/test/version-filters/daughter/dub.sdl +++ b/test/new_tests/version-filters/daughter/dub.sdl @@ -1,4 +1,4 @@ -name "daughter" +name "version-filters-daughter" versions "Daughter" debugVersions "dDaughter" x:versionFilters "Daughter" "Parent" diff --git a/test/version-filters/daughter/source/dummy.d b/test/new_tests/version-filters/daughter/source/dummy.d similarity index 100% rename from test/version-filters/daughter/source/dummy.d rename to test/new_tests/version-filters/daughter/source/dummy.d diff --git a/test/version-filters/dub.sdl b/test/new_tests/version-filters/dub.sdl similarity index 55% rename from test/version-filters/dub.sdl rename to test/new_tests/version-filters/dub.sdl index 9f79da4533..9ddaefad2f 100644 --- a/test/version-filters/dub.sdl +++ b/test/new_tests/version-filters/dub.sdl @@ -3,5 +3,5 @@ versions "Parent" debugVersions "dParent" x:versionFilters "Parent" x:debugVersionFilters "dParent" -dependency "daughter" path="daughter" -dependency "son" path="son" +dependency "version-filters-daughter" path="daughter" +dependency "version-filters-son" path="son" diff --git a/test/version-filters/son/dub.sdl b/test/new_tests/version-filters/son/dub.sdl similarity index 76% rename from test/version-filters/son/dub.sdl rename to test/new_tests/version-filters/son/dub.sdl index e851dd692a..0793dfd848 100644 --- a/test/version-filters/son/dub.sdl +++ b/test/new_tests/version-filters/son/dub.sdl @@ -1,4 +1,4 @@ -name "son" +name "version-filters-son" versions "Son" debugVersions "dSon" x:versionFilters "Son" diff --git a/test/version-filters/son/source/dummy.d b/test/new_tests/version-filters/son/source/dummy.d similarity index 100% rename from test/version-filters/son/source/dummy.d rename to test/new_tests/version-filters/son/source/dummy.d diff --git a/test/version-filters/source/app.d b/test/new_tests/version-filters/source/app.d similarity index 100% rename from test/version-filters/source/app.d rename to test/new_tests/version-filters/source/app.d diff --git a/test/new_tests/version-filters/test.config b/test/new_tests/version-filters/test.config new file mode 100644 index 0000000000..187d256a67 --- /dev/null +++ b/test/new_tests/version-filters/test.config @@ -0,0 +1,2 @@ +dub_command = build +extra_dub_args = --filter-versions \ No newline at end of file diff --git a/test/version-filters/.gitignore b/test/version-filters/.gitignore deleted file mode 100644 index c09a5970c4..0000000000 --- a/test/version-filters/.gitignore +++ /dev/null @@ -1,15 +0,0 @@ -.dub -docs.json -__dummy.html -docs/ -issue1262-version-inheritance-diamond -issue1262-version-inheritance-diamond.so -issue1262-version-inheritance-diamond.dylib -issue1262-version-inheritance-diamond.dll -issue1262-version-inheritance-diamond.a -issue1262-version-inheritance-diamond.lib -issue1262-version-inheritance-diamond-test-* -*.exe -*.o -*.obj -*.lst diff --git a/test/version-filters/.no_build b/test/version-filters/.no_build deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/version-filters/.no_run b/test/version-filters/.no_run deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/version-filters/.no_test b/test/version-filters/.no_test deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/version-filters/daughter/.gitignore b/test/version-filters/daughter/.gitignore deleted file mode 100644 index f190acb869..0000000000 --- a/test/version-filters/daughter/.gitignore +++ /dev/null @@ -1,14 +0,0 @@ -.dub -docs.json -__dummy.html -docs/ -daughter.so -daughter.dylib -daughter.dll -daughter.a -daughter.lib -daughter-test-* -*.exe -*.o -*.obj -*.lst diff --git a/test/version-filters/son/.gitignore b/test/version-filters/son/.gitignore deleted file mode 100644 index 601a33b470..0000000000 --- a/test/version-filters/son/.gitignore +++ /dev/null @@ -1,14 +0,0 @@ -.dub -docs.json -__dummy.html -docs/ -son.so -son.dylib -son.dll -son.a -son.lib -son-test-* -*.exe -*.o -*.obj -*.lst From cf3b5307cd20f459fc28ab549201d3c378c6f1f5 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 26 Jul 2025 18:44:04 +0300 Subject: [PATCH 176/187] version-filters-diamond Signed-off-by: Andrei Horodniceanu --- test/new_tests/version-filters-diamond/.gitignore | 3 +++ .../version-filters-diamond/daughter/dub.sdl | 4 ++-- .../daughter/source/dummy.d | 0 .../version-filters-diamond/diamond/.gitignore | 1 + .../version-filters-diamond/diamond/dub.sdl | 2 +- .../diamond/source/dummy.d | 0 .../version-filters-diamond/dub.sdl | 4 ++-- .../new_tests/version-filters-diamond/son/dub.sdl | 6 ++++++ .../version-filters-diamond/son/source/dummy.d | 0 .../version-filters-diamond/source/app.d | 0 .../new_tests/version-filters-diamond/test.config | 2 ++ test/version-filters-diamond/.gitignore | 15 --------------- test/version-filters-diamond/.no_build | 0 test/version-filters-diamond/.no_run | 0 test/version-filters-diamond/.no_test | 0 test/version-filters-diamond/daughter/.gitignore | 14 -------------- test/version-filters-diamond/diamond/.gitignore | 14 -------------- test/version-filters-diamond/son/.gitignore | 14 -------------- test/version-filters-diamond/son/dub.sdl | 6 ------ 19 files changed, 17 insertions(+), 68 deletions(-) create mode 100644 test/new_tests/version-filters-diamond/.gitignore rename test/{ => new_tests}/version-filters-diamond/daughter/dub.sdl (55%) rename test/{ => new_tests}/version-filters-diamond/daughter/source/dummy.d (100%) create mode 100644 test/new_tests/version-filters-diamond/diamond/.gitignore rename test/{ => new_tests}/version-filters-diamond/diamond/dub.sdl (53%) rename test/{ => new_tests}/version-filters-diamond/diamond/source/dummy.d (100%) rename test/{ => new_tests}/version-filters-diamond/dub.sdl (53%) create mode 100644 test/new_tests/version-filters-diamond/son/dub.sdl rename test/{ => new_tests}/version-filters-diamond/son/source/dummy.d (100%) rename test/{ => new_tests}/version-filters-diamond/source/app.d (100%) create mode 100644 test/new_tests/version-filters-diamond/test.config delete mode 100644 test/version-filters-diamond/.gitignore delete mode 100644 test/version-filters-diamond/.no_build delete mode 100644 test/version-filters-diamond/.no_run delete mode 100644 test/version-filters-diamond/.no_test delete mode 100644 test/version-filters-diamond/daughter/.gitignore delete mode 100644 test/version-filters-diamond/diamond/.gitignore delete mode 100644 test/version-filters-diamond/son/.gitignore delete mode 100644 test/version-filters-diamond/son/dub.sdl diff --git a/test/new_tests/version-filters-diamond/.gitignore b/test/new_tests/version-filters-diamond/.gitignore new file mode 100644 index 0000000000..9a14c13e05 --- /dev/null +++ b/test/new_tests/version-filters-diamond/.gitignore @@ -0,0 +1,3 @@ +!/son/ +!/daughter/ +!/diamond/ \ No newline at end of file diff --git a/test/version-filters-diamond/daughter/dub.sdl b/test/new_tests/version-filters-diamond/daughter/dub.sdl similarity index 55% rename from test/version-filters-diamond/daughter/dub.sdl rename to test/new_tests/version-filters-diamond/daughter/dub.sdl index 9562cc5e83..08167675a8 100644 --- a/test/version-filters-diamond/daughter/dub.sdl +++ b/test/new_tests/version-filters-diamond/daughter/dub.sdl @@ -1,6 +1,6 @@ -name "daughter" +name "version-filters-diamond-daughter" versions "Daughter" debugVersions "dDaughter" x:versionFilters "Daughter" "Parent" x:debugVersionFilters "dDaughter" "dParent" -dependency "diamond" path="../diamond" +dependency "version-filters-diamond-diamond" path="../diamond" diff --git a/test/version-filters-diamond/daughter/source/dummy.d b/test/new_tests/version-filters-diamond/daughter/source/dummy.d similarity index 100% rename from test/version-filters-diamond/daughter/source/dummy.d rename to test/new_tests/version-filters-diamond/daughter/source/dummy.d diff --git a/test/new_tests/version-filters-diamond/diamond/.gitignore b/test/new_tests/version-filters-diamond/diamond/.gitignore new file mode 100644 index 0000000000..e9fe786b22 --- /dev/null +++ b/test/new_tests/version-filters-diamond/diamond/.gitignore @@ -0,0 +1 @@ +/version-filters-diamond-diamond \ No newline at end of file diff --git a/test/version-filters-diamond/diamond/dub.sdl b/test/new_tests/version-filters-diamond/diamond/dub.sdl similarity index 53% rename from test/version-filters-diamond/diamond/dub.sdl rename to test/new_tests/version-filters-diamond/diamond/dub.sdl index afdb2725cd..6b5002513d 100644 --- a/test/version-filters-diamond/diamond/dub.sdl +++ b/test/new_tests/version-filters-diamond/diamond/dub.sdl @@ -1,3 +1,3 @@ -name "diamond" +name "version-filters-diamond-diamond" versions "Diamond" debugVersions "dDiamond" diff --git a/test/version-filters-diamond/diamond/source/dummy.d b/test/new_tests/version-filters-diamond/diamond/source/dummy.d similarity index 100% rename from test/version-filters-diamond/diamond/source/dummy.d rename to test/new_tests/version-filters-diamond/diamond/source/dummy.d diff --git a/test/version-filters-diamond/dub.sdl b/test/new_tests/version-filters-diamond/dub.sdl similarity index 53% rename from test/version-filters-diamond/dub.sdl rename to test/new_tests/version-filters-diamond/dub.sdl index 51295fd051..e55158b5a2 100644 --- a/test/version-filters-diamond/dub.sdl +++ b/test/new_tests/version-filters-diamond/dub.sdl @@ -3,5 +3,5 @@ versions "Parent" debugVersions "dParent" x:versionFilters "Parent" x:debugVersionFilters "dParent" -dependency "daughter" path="daughter" -dependency "son" path="son" +dependency "version-filters-diamond-daughter" path="daughter" +dependency "version-filters-diamond-son" path="son" diff --git a/test/new_tests/version-filters-diamond/son/dub.sdl b/test/new_tests/version-filters-diamond/son/dub.sdl new file mode 100644 index 0000000000..21c5c6f88d --- /dev/null +++ b/test/new_tests/version-filters-diamond/son/dub.sdl @@ -0,0 +1,6 @@ +name "version-filters-diamond-son" +versions "Son" +debugVersions "dSon" +x:versionFilters "Son" +x:debugVersionFilters "dSon" +dependency "version-filters-diamond-diamond" path="../diamond" diff --git a/test/version-filters-diamond/son/source/dummy.d b/test/new_tests/version-filters-diamond/son/source/dummy.d similarity index 100% rename from test/version-filters-diamond/son/source/dummy.d rename to test/new_tests/version-filters-diamond/son/source/dummy.d diff --git a/test/version-filters-diamond/source/app.d b/test/new_tests/version-filters-diamond/source/app.d similarity index 100% rename from test/version-filters-diamond/source/app.d rename to test/new_tests/version-filters-diamond/source/app.d diff --git a/test/new_tests/version-filters-diamond/test.config b/test/new_tests/version-filters-diamond/test.config new file mode 100644 index 0000000000..187d256a67 --- /dev/null +++ b/test/new_tests/version-filters-diamond/test.config @@ -0,0 +1,2 @@ +dub_command = build +extra_dub_args = --filter-versions \ No newline at end of file diff --git a/test/version-filters-diamond/.gitignore b/test/version-filters-diamond/.gitignore deleted file mode 100644 index c09a5970c4..0000000000 --- a/test/version-filters-diamond/.gitignore +++ /dev/null @@ -1,15 +0,0 @@ -.dub -docs.json -__dummy.html -docs/ -issue1262-version-inheritance-diamond -issue1262-version-inheritance-diamond.so -issue1262-version-inheritance-diamond.dylib -issue1262-version-inheritance-diamond.dll -issue1262-version-inheritance-diamond.a -issue1262-version-inheritance-diamond.lib -issue1262-version-inheritance-diamond-test-* -*.exe -*.o -*.obj -*.lst diff --git a/test/version-filters-diamond/.no_build b/test/version-filters-diamond/.no_build deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/version-filters-diamond/.no_run b/test/version-filters-diamond/.no_run deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/version-filters-diamond/.no_test b/test/version-filters-diamond/.no_test deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/version-filters-diamond/daughter/.gitignore b/test/version-filters-diamond/daughter/.gitignore deleted file mode 100644 index f190acb869..0000000000 --- a/test/version-filters-diamond/daughter/.gitignore +++ /dev/null @@ -1,14 +0,0 @@ -.dub -docs.json -__dummy.html -docs/ -daughter.so -daughter.dylib -daughter.dll -daughter.a -daughter.lib -daughter-test-* -*.exe -*.o -*.obj -*.lst diff --git a/test/version-filters-diamond/diamond/.gitignore b/test/version-filters-diamond/diamond/.gitignore deleted file mode 100644 index c359a73474..0000000000 --- a/test/version-filters-diamond/diamond/.gitignore +++ /dev/null @@ -1,14 +0,0 @@ -.dub -docs.json -__dummy.html -docs/ -diamond.so -diamond.dylib -diamond.dll -diamond.a -diamond.lib -diamond-test-* -*.exe -*.o -*.obj -*.lst diff --git a/test/version-filters-diamond/son/.gitignore b/test/version-filters-diamond/son/.gitignore deleted file mode 100644 index 601a33b470..0000000000 --- a/test/version-filters-diamond/son/.gitignore +++ /dev/null @@ -1,14 +0,0 @@ -.dub -docs.json -__dummy.html -docs/ -son.so -son.dylib -son.dll -son.a -son.lib -son-test-* -*.exe -*.o -*.obj -*.lst diff --git a/test/version-filters-diamond/son/dub.sdl b/test/version-filters-diamond/son/dub.sdl deleted file mode 100644 index 3e0a630c69..0000000000 --- a/test/version-filters-diamond/son/dub.sdl +++ /dev/null @@ -1,6 +0,0 @@ -name "son" -versions "Son" -debugVersions "dSon" -x:versionFilters "Son" -x:debugVersionFilters "dSon" -dependency "diamond" path="../diamond" From 797f5ecc533cbc83c77b9feea3a88473f7b188a2 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 26 Jul 2025 18:46:09 +0300 Subject: [PATCH 177/187] version-filters-none Signed-off-by: Andrei Horodniceanu --- test/{ => new_tests}/version-filters-none/dub.sdl | 0 .../version-filters-none/source/app.d | 0 test/new_tests/version-filters-none/test.config | 2 ++ test/version-filters-none/.gitignore | 15 --------------- test/version-filters-none/.no_build | 0 test/version-filters-none/.no_run | 0 test/version-filters-none/.no_test | 0 7 files changed, 2 insertions(+), 15 deletions(-) rename test/{ => new_tests}/version-filters-none/dub.sdl (100%) rename test/{ => new_tests}/version-filters-none/source/app.d (100%) create mode 100644 test/new_tests/version-filters-none/test.config delete mode 100644 test/version-filters-none/.gitignore delete mode 100644 test/version-filters-none/.no_build delete mode 100644 test/version-filters-none/.no_run delete mode 100644 test/version-filters-none/.no_test diff --git a/test/version-filters-none/dub.sdl b/test/new_tests/version-filters-none/dub.sdl similarity index 100% rename from test/version-filters-none/dub.sdl rename to test/new_tests/version-filters-none/dub.sdl diff --git a/test/version-filters-none/source/app.d b/test/new_tests/version-filters-none/source/app.d similarity index 100% rename from test/version-filters-none/source/app.d rename to test/new_tests/version-filters-none/source/app.d diff --git a/test/new_tests/version-filters-none/test.config b/test/new_tests/version-filters-none/test.config new file mode 100644 index 0000000000..187d256a67 --- /dev/null +++ b/test/new_tests/version-filters-none/test.config @@ -0,0 +1,2 @@ +dub_command = build +extra_dub_args = --filter-versions \ No newline at end of file diff --git a/test/version-filters-none/.gitignore b/test/version-filters-none/.gitignore deleted file mode 100644 index c09a5970c4..0000000000 --- a/test/version-filters-none/.gitignore +++ /dev/null @@ -1,15 +0,0 @@ -.dub -docs.json -__dummy.html -docs/ -issue1262-version-inheritance-diamond -issue1262-version-inheritance-diamond.so -issue1262-version-inheritance-diamond.dylib -issue1262-version-inheritance-diamond.dll -issue1262-version-inheritance-diamond.a -issue1262-version-inheritance-diamond.lib -issue1262-version-inheritance-diamond-test-* -*.exe -*.o -*.obj -*.lst diff --git a/test/version-filters-none/.no_build b/test/version-filters-none/.no_build deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/version-filters-none/.no_run b/test/version-filters-none/.no_run deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/version-filters-none/.no_test b/test/version-filters-none/.no_test deleted file mode 100644 index e69de29bb2..0000000000 From 0c18d25587c66d30fafa4f21f5eb67923be44b01 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 26 Jul 2025 18:48:07 +0300 Subject: [PATCH 178/187] version-filters-source-dep Signed-off-by: Andrei Horodniceanu --- .../version-filters-source-dep/.gitignore | 1 + .../version-filters-source-dep/dub.sdl | 2 +- .../version-filters-source-dep/source-dep/dub.sdl | 2 +- .../source-dep/source/dummy.d | 0 .../version-filters-source-dep/source/app.d | 0 .../version-filters-source-dep/test.config | 2 ++ test/version-filters-source-dep/.gitignore | 15 --------------- test/version-filters-source-dep/.no_build | 0 test/version-filters-source-dep/.no_run | 0 test/version-filters-source-dep/.no_test | 0 10 files changed, 5 insertions(+), 17 deletions(-) create mode 100644 test/new_tests/version-filters-source-dep/.gitignore rename test/{ => new_tests}/version-filters-source-dep/dub.sdl (62%) rename test/{ => new_tests}/version-filters-source-dep/source-dep/dub.sdl (83%) rename test/{ => new_tests}/version-filters-source-dep/source-dep/source/dummy.d (100%) rename test/{ => new_tests}/version-filters-source-dep/source/app.d (100%) create mode 100644 test/new_tests/version-filters-source-dep/test.config delete mode 100644 test/version-filters-source-dep/.gitignore delete mode 100644 test/version-filters-source-dep/.no_build delete mode 100644 test/version-filters-source-dep/.no_run delete mode 100644 test/version-filters-source-dep/.no_test diff --git a/test/new_tests/version-filters-source-dep/.gitignore b/test/new_tests/version-filters-source-dep/.gitignore new file mode 100644 index 0000000000..e582da3864 --- /dev/null +++ b/test/new_tests/version-filters-source-dep/.gitignore @@ -0,0 +1 @@ +!/source-dep/ \ No newline at end of file diff --git a/test/version-filters-source-dep/dub.sdl b/test/new_tests/version-filters-source-dep/dub.sdl similarity index 62% rename from test/version-filters-source-dep/dub.sdl rename to test/new_tests/version-filters-source-dep/dub.sdl index 73d4834dc3..1e789ae9b5 100644 --- a/test/version-filters-source-dep/dub.sdl +++ b/test/new_tests/version-filters-source-dep/dub.sdl @@ -2,4 +2,4 @@ name "version-filters-source-dep" versions "Parent" debugVersions "dParent" x:versionFilters "none" -dependency "source-dep" path="source-dep" +dependency "version-filters-source-dep-ex" path="source-dep" diff --git a/test/version-filters-source-dep/source-dep/dub.sdl b/test/new_tests/version-filters-source-dep/source-dep/dub.sdl similarity index 83% rename from test/version-filters-source-dep/source-dep/dub.sdl rename to test/new_tests/version-filters-source-dep/source-dep/dub.sdl index d9b7c63f06..eb98c2c8eb 100644 --- a/test/version-filters-source-dep/source-dep/dub.sdl +++ b/test/new_tests/version-filters-source-dep/source-dep/dub.sdl @@ -1,4 +1,4 @@ -name "source-dep" +name "version-filters-source-dep-ex" versions "SourceDep" debugVersions "dSourceDep" # filter of sourceOnly libs are merged with dependents diff --git a/test/version-filters-source-dep/source-dep/source/dummy.d b/test/new_tests/version-filters-source-dep/source-dep/source/dummy.d similarity index 100% rename from test/version-filters-source-dep/source-dep/source/dummy.d rename to test/new_tests/version-filters-source-dep/source-dep/source/dummy.d diff --git a/test/version-filters-source-dep/source/app.d b/test/new_tests/version-filters-source-dep/source/app.d similarity index 100% rename from test/version-filters-source-dep/source/app.d rename to test/new_tests/version-filters-source-dep/source/app.d diff --git a/test/new_tests/version-filters-source-dep/test.config b/test/new_tests/version-filters-source-dep/test.config new file mode 100644 index 0000000000..1da4c146a2 --- /dev/null +++ b/test/new_tests/version-filters-source-dep/test.config @@ -0,0 +1,2 @@ +dub_command = build +extra_dub_args = --filter-versions diff --git a/test/version-filters-source-dep/.gitignore b/test/version-filters-source-dep/.gitignore deleted file mode 100644 index c09a5970c4..0000000000 --- a/test/version-filters-source-dep/.gitignore +++ /dev/null @@ -1,15 +0,0 @@ -.dub -docs.json -__dummy.html -docs/ -issue1262-version-inheritance-diamond -issue1262-version-inheritance-diamond.so -issue1262-version-inheritance-diamond.dylib -issue1262-version-inheritance-diamond.dll -issue1262-version-inheritance-diamond.a -issue1262-version-inheritance-diamond.lib -issue1262-version-inheritance-diamond-test-* -*.exe -*.o -*.obj -*.lst diff --git a/test/version-filters-source-dep/.no_build b/test/version-filters-source-dep/.no_build deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/version-filters-source-dep/.no_run b/test/version-filters-source-dep/.no_run deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/version-filters-source-dep/.no_test b/test/version-filters-source-dep/.no_test deleted file mode 100644 index e69de29bb2..0000000000 From 2edc99fd0a2718c40593ff12b87421fd17b311d7 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 26 Jul 2025 21:55:08 +0300 Subject: [PATCH 179/187] version-spec Signed-off-by: Andrei Horodniceanu --- test/new_tests/version-spec/.gitignore | 7 + test/new_tests/version-spec/dub.json | 8 ++ .../version-spec/sample}/newfoo/dub.sdl | 0 .../version-spec/sample}/newfoo/source/app.d | 0 .../version-spec/sample}/oldfoo/dub.sdl | 0 .../version-spec/sample}/oldfoo/source/app.d | 0 test/new_tests/version-spec/source/app.d | 134 ++++++++++++++++++ test/version-spec.sh | 67 --------- test/version-spec/.no_build | 0 test/version-spec/.no_run | 0 test/version-spec/.no_test | 0 11 files changed, 149 insertions(+), 67 deletions(-) create mode 100644 test/new_tests/version-spec/.gitignore create mode 100644 test/new_tests/version-spec/dub.json rename test/{version-spec => new_tests/version-spec/sample}/newfoo/dub.sdl (100%) rename test/{version-spec => new_tests/version-spec/sample}/newfoo/source/app.d (100%) rename test/{version-spec => new_tests/version-spec/sample}/oldfoo/dub.sdl (100%) rename test/{version-spec => new_tests/version-spec/sample}/oldfoo/source/app.d (100%) create mode 100644 test/new_tests/version-spec/source/app.d delete mode 100755 test/version-spec.sh delete mode 100644 test/version-spec/.no_build delete mode 100644 test/version-spec/.no_run delete mode 100644 test/version-spec/.no_test diff --git a/test/new_tests/version-spec/.gitignore b/test/new_tests/version-spec/.gitignore new file mode 100644 index 0000000000..5a481496dc --- /dev/null +++ b/test/new_tests/version-spec/.gitignore @@ -0,0 +1,7 @@ +/sample/** +!/sample/ +!/sample/newfoo/ +!/sample/oldfoo/ +!/sample/*/dub.sdl +!/sample/*/source/ +!/sample/*/source/** \ No newline at end of file diff --git a/test/new_tests/version-spec/dub.json b/test/new_tests/version-spec/dub.json new file mode 100644 index 0000000000..558363bcb2 --- /dev/null +++ b/test/new_tests/version-spec/dub.json @@ -0,0 +1,8 @@ +{ + "name": "version-spec", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/version-spec/newfoo/dub.sdl b/test/new_tests/version-spec/sample/newfoo/dub.sdl similarity index 100% rename from test/version-spec/newfoo/dub.sdl rename to test/new_tests/version-spec/sample/newfoo/dub.sdl diff --git a/test/version-spec/newfoo/source/app.d b/test/new_tests/version-spec/sample/newfoo/source/app.d similarity index 100% rename from test/version-spec/newfoo/source/app.d rename to test/new_tests/version-spec/sample/newfoo/source/app.d diff --git a/test/version-spec/oldfoo/dub.sdl b/test/new_tests/version-spec/sample/oldfoo/dub.sdl similarity index 100% rename from test/version-spec/oldfoo/dub.sdl rename to test/new_tests/version-spec/sample/oldfoo/dub.sdl diff --git a/test/version-spec/oldfoo/source/app.d b/test/new_tests/version-spec/sample/oldfoo/source/app.d similarity index 100% rename from test/version-spec/oldfoo/source/app.d rename to test/new_tests/version-spec/sample/oldfoo/source/app.d diff --git a/test/new_tests/version-spec/source/app.d b/test/new_tests/version-spec/source/app.d new file mode 100644 index 0000000000..338516f731 --- /dev/null +++ b/test/new_tests/version-spec/source/app.d @@ -0,0 +1,134 @@ +import common; + +import std.algorithm; +import std.conv; +import std.file; +import std.path; +import std.process; +import std.range; +import std.string; + +void main () { + if (spawnProcess([dub, "add-local", getcwd.buildPath("sample", "newfoo")]).wait != 0) + die("dub add-local newfoo failed"); + if (spawnProcess([dub, "add-local", getcwd.buildPath("sample", "oldfoo")]).wait != 0) + die("dub add-local oldfoo failed"); + + string[] getLines(string[] args) { + log("Running ", text(dub ~ args), " ..."); + immutable p = execute(dub ~ args); + if (p.status != 0) { + log("Dub output:"); + log(p.output); + die("failed to run ", text(dub ~ args)); + } + return p.output.splitLines; + } + + void tc(string[] args, string delegate(const string[]) mapper, string needle) { + const lines = getLines(args); + immutable targetLine = mapper(lines); + + if (!targetLine.canFind(needle)) { + log("Dub output:"); + foreach (line; lines) + log(line); + log("The found line: ", targetLine); + log("needle: ", needle); + die("failed ", text(args)); + } + } + + void findOnPathLine(string[] args, string needle) { + tc(args, a => a.find!`a.canFind("path")`.front, needle); + } + + immutable newFooDir = dirSeparator ~ "newfoo" ~ dirSeparator; + immutable oldFooDir = dirSeparator ~ "oldfoo" ~ dirSeparator; + + findOnPathLine(["describe", "foo"], newFooDir); + findOnPathLine(["describe", "foo@1.0.0"], newFooDir); + findOnPathLine(["describe", "foo@0.1.0"], oldFooDir); + findOnPathLine(["describe", "foo@<1.0.0"], oldFooDir); + findOnPathLine(["describe", "foo@>0.1.0"], newFooDir); + findOnPathLine(["describe", "foo@>0.2.0"], newFooDir); + findOnPathLine(["describe", "foo@<=0.2.0"], oldFooDir); + findOnPathLine(["describe", "foo@*"], newFooDir); + findOnPathLine(["describe", "foo@>0.0.1 <2.0.0"], newFooDir); + + void findOnFirstLine(string[] args, string needle) { + tc(args, a => a[0], needle); + } + + findOnFirstLine(["test", "foo"], newFooDir); + findOnFirstLine(["test", "foo@1.0.0"], newFooDir); + findOnFirstLine(["test", "foo@0.1.0"], oldFooDir); + + log("The lint tests can take longer on the first run"); + findOnFirstLine(["lint", "foo"], newFooDir); + findOnFirstLine(["lint", "foo@1.0.0"], newFooDir); + findOnFirstLine(["lint", "foo@0.1.0"], oldFooDir); + + findOnFirstLine(["generate", "cmake", "foo"], newFooDir); + findOnFirstLine(["generate", "cmake", "foo@1.0.0"], newFooDir); + findOnFirstLine(["generate", "cmake", "foo@0.1.0"], oldFooDir); + + findOnFirstLine(["build", "-n", "foo"], newFooDir); + findOnFirstLine(["build", "-n", "foo@1.0.0"], newFooDir); + findOnFirstLine(["build", "-n", "foo@0.1.0"], oldFooDir); + + void findOnLastLine(string[] args, string needle) { + tc(args, a => a[$ - 1], needle); + } + + findOnLastLine(["run", "-n", "foo"], "new-foo"); + findOnLastLine(["run", "-n", "foo@1.0.0"], "new-foo"); + findOnLastLine(["run", "-n", "foo@0.1.0"], "old-foo"); + + void countLines(string[] args, int expected) { + const lines = getLines(args); + if (lines.length != expected) + die(text(args), " didn't produce ", text(expected), " lines"); + } + countLines(["list", "foo"], 4); + countLines(["list", "foo@0.1.0"], 3); + tc(["list", "foo@>0.1.0"], a => a[1], newFooDir); + + + if (spawnProcess([dub, "remove-local", "sample/newfoo"]).wait != 0) + die("dub remove-local newfoo failed"); + if (spawnProcess([dub, "remove-local", "sample/oldfoo"]).wait != 0) + die("dub remove-local oldfoo failed"); + + void assertIsDir(string path) { + if (!exists(path)) + die(path, " doesn't exist"); + if (!isDir(path)) + die(path, " exists but it's a directory"); + } + + immutable dubPkgPath = dubHome.buildPath("packages", "dub"); + if (spawnProcess([dub, "fetch", "dub@1.9.0"]).wait != 0) + die("dub fetch dub@1.9.0 failed"); + assertIsDir(dubPkgPath.buildPath("1.9.0", "dub")); + + if (spawnProcess([dub, "fetch", "dub=1.10.0"]).wait != 0) + die("dub fetch dub=1.10.0 failed"); + assertIsDir(dubPkgPath.buildPath("1.10.0", "dub")); + + + if (spawnProcess([dub, "remove", "dub@1.9.0"]).wait != 0) + die("dub remove dub@1.9.0 failed"); + if (spawnProcess([dub, "remove", "dub=1.10.0"]).wait != 0) + die("dub remove dub=1.10.0 failed"); + + bool existsDir(string path) { + return exists(path) && isDir(path); + } + if (existsDir(dubPkgPath.buildPath("dub", "1.9.0"))) + die("Failed to remove dub@1.9.0"); + if (existsDir(dubPkgPath.buildPath("dub", "1.10.0"))) + die("Failed to remove dub=1.10.0"); +} + +// "" diff --git a/test/version-spec.sh b/test/version-spec.sh deleted file mode 100755 index 77020da259..0000000000 --- a/test/version-spec.sh +++ /dev/null @@ -1,67 +0,0 @@ -#!/usr/bin/env bash - -. $(dirname "${BASH_SOURCE[0]}")/common.sh - -# When pipeing the dub output it is possible for head/tail to extract -# the output line before dub finished printing leading to dub -# receiving SIGPIPE. With pipefail this would fail the whole $() -# invocation leading to a ERROR result but, since $() invokes a -# subshell, the rest of the test still continue (and passes). The end -# result are 2 log lines, one for success and one for failure, for -# this single test file. -# -# The command that consistently fails for me is: -# $DUB list foo@'>0.1.0' | head -n 2 | tail -n 1 -set +o pipefail - -DUBPKGPATH=${DPATH+"$DPATH/dub/packages/dub"} -DUBPKGPATH=${DUBPKGPATH:-"$HOME/.dub/packages/dub"} - -$DUB add-local "$CURR_DIR/version-spec/newfoo" -$DUB add-local "$CURR_DIR/version-spec/oldfoo" - -[[ $($DUB describe foo | grep path | head -n 1) == *"/newfoo/"* ]] -[[ $($DUB describe foo@1.0.0 | grep path | head -n 1) == *"/newfoo/"* ]] -[[ $($DUB describe foo@0.1.0 | grep path | head -n 1) == *"/oldfoo/"* ]] - -[[ $($DUB describe foo@'<1.0.0' | grep path | head -n 1) == *"/oldfoo/"* ]] -[[ $($DUB describe foo@'>0.1.0' | grep path | head -n 1) == *"/newfoo/"* ]] -[[ $($DUB describe foo@'>0.2.0' | grep path | head -n 1) == *"/newfoo/"* ]] -[[ $($DUB describe foo@'<=0.2.0' | grep path | head -n 1) == *"/oldfoo/"* ]] -[[ $($DUB describe foo@'*' | grep path | head -n 1) == *"/newfoo/"* ]] -[[ $($DUB describe foo@'>0.0.1 <2.0.0' | grep path | head -n 1) == *"/newfoo/"* ]] - -[[ $($DUB test foo | tail -n +1 | head -n 1) == *"/newfoo/" ]] -[[ $($DUB test foo@1.0.0 | tail -n +1 | head -n 1) == *"/newfoo/" ]] -[[ $($DUB test foo@0.1.0 | tail -n +1 | head -n 1) == *"/oldfoo/" ]] - -[[ $($DUB lint foo | tail -n 1) == *"/newfoo/" ]] -[[ $($DUB lint foo@1.0.0 | tail -n 1) == *"/newfoo/" ]] -[[ $($DUB lint foo@0.1.0 | tail -n 1) == *"/oldfoo/" ]] - -[[ $($DUB generate cmake foo | tail -n +1 | head -n 1) == *"/newfoo/" ]] -[[ $($DUB generate cmake foo@1.0.0 | tail -n +1 | head -n 1) == *"/newfoo/" ]] -[[ $($DUB generate cmake foo@0.1.0 | tail -n +1 | head -n 1) == *"/oldfoo/" ]] - -[[ $($DUB build -n foo | tail -n +1 | head -n 1) == *"/newfoo/" ]] -[[ $($DUB build -n foo@1.0.0 | tail -n +1 | head -n 1) == *"/newfoo/" ]] -[[ $($DUB build -n foo@0.1.0 | tail -n +1 | head -n 1) == *"/oldfoo/" ]] - -[[ $($DUB run -n foo | tail -n 1) == 'new-foo' ]] -[[ $($DUB run -n foo@1.0.0 | tail -n 1) == 'new-foo' ]] -[[ $($DUB run -n foo@0.1.0 | tail -n 1) == 'old-foo' ]] - -[[ $($DUB list foo | wc -l) == '4' ]] -[[ $($DUB list foo@0.1.0 | wc -l) == '3' ]] -[[ $($DUB list foo@'>0.1.0' | head -n 2 | tail -n 1) == *"/newfoo"* ]] - -$DUB remove-local "$CURR_DIR/version-spec/newfoo" -$DUB remove-local "$CURR_DIR/version-spec/oldfoo" - -$DUB fetch dub@1.9.0 && [ -d $DUBPKGPATH/1.9.0/dub ] -$DUB fetch dub=1.10.0 && [ -d $DUBPKGPATH/1.10.0/dub ] -$DUB remove dub@1.9.0 -$DUB remove dub=1.10.0 -if [ -d $DUBPKGPATH/1.9.0/dub ] || [ -d $DUBPKGPATH/1.10.0/dub ]; then - die $LINENO 'Failed to remove specified versions' -fi diff --git a/test/version-spec/.no_build b/test/version-spec/.no_build deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/version-spec/.no_run b/test/version-spec/.no_run deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/version-spec/.no_test b/test/version-spec/.no_test deleted file mode 100644 index e69de29bb2..0000000000 From aca5241df51926f48bae44bfa1fd88bf996184f4 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 26 Jul 2025 22:13:41 +0300 Subject: [PATCH 180/187] win32_default Signed-off-by: Andrei Horodniceanu --- test/new_tests/win32_default/.gitignore | 1 + test/new_tests/win32_default/dub.json | 8 ++ .../win32_default/sample.d} | 0 test/new_tests/win32_default/source/app.d | 62 +++++++++++++ test/new_tests/win32_default/test.config | 2 + test/win32_default.script.d | 89 ------------------- 6 files changed, 73 insertions(+), 89 deletions(-) create mode 100644 test/new_tests/win32_default/.gitignore create mode 100644 test/new_tests/win32_default/dub.json rename test/{win32_default.d => new_tests/win32_default/sample.d} (100%) create mode 100644 test/new_tests/win32_default/source/app.d create mode 100644 test/new_tests/win32_default/test.config delete mode 100644 test/win32_default.script.d diff --git a/test/new_tests/win32_default/.gitignore b/test/new_tests/win32_default/.gitignore new file mode 100644 index 0000000000..96d3e27157 --- /dev/null +++ b/test/new_tests/win32_default/.gitignore @@ -0,0 +1 @@ +!/sample.d \ No newline at end of file diff --git a/test/new_tests/win32_default/dub.json b/test/new_tests/win32_default/dub.json new file mode 100644 index 0000000000..42a668d3c4 --- /dev/null +++ b/test/new_tests/win32_default/dub.json @@ -0,0 +1,8 @@ +{ + "name": "win32_default", + "dependencies": { + "common": { + "path": "../common" + } + } +} diff --git a/test/win32_default.d b/test/new_tests/win32_default/sample.d similarity index 100% rename from test/win32_default.d rename to test/new_tests/win32_default/sample.d diff --git a/test/new_tests/win32_default/source/app.d b/test/new_tests/win32_default/source/app.d new file mode 100644 index 0000000000..ed90b1e26b --- /dev/null +++ b/test/new_tests/win32_default/source/app.d @@ -0,0 +1,62 @@ +import common; + +import std.algorithm; +import std.file; +import std.path; +import std.process; +import std.stdio; + +void main() +{ + const file = buildPath(getcwd, "sample.d"); + + const dmd = environment.get("DC"); + + int exitCode; + + void runTest(scope const string[] cmd) + { + const result = execute(cmd); + + if (result.status || result.output.canFind("Failed")) + { + writefln("\n> %-(%s %)", cmd); + writeln("==========================================================="); + writeln(result.output); + writeln("==========================================================="); + writeln("Last command failed with exit code ", result.status, '\n'); + exitCode = 1; + } + } + + // Test without --arch + runTest([ + dub, "build", + "--config", "MsCoff64", + "--single", file, + ]); + + // Test with different --arch + const string[2][] tests = [ + [ "x86", "Default" ], + [ "x86_omf", "MsCoff" ], + [ "x86_mscoff", "MsCoff" ], + [ "x86_64", "MsCoff64" ], + ]; + + foreach (string[2] test; tests) + { + const arch = test[0]; + const config = test[1]; + + runTest([ + dub, "build", + "--arch", arch, + "--config", config, + "--single", file, + ]); + } + + if (exitCode) + die("some tests failed"); +} diff --git a/test/new_tests/win32_default/test.config b/test/new_tests/win32_default/test.config new file mode 100644 index 0000000000..82dbd3cff3 --- /dev/null +++ b/test/new_tests/win32_default/test.config @@ -0,0 +1,2 @@ +os = windows +dc_backend = dmd \ No newline at end of file diff --git a/test/win32_default.script.d b/test/win32_default.script.d deleted file mode 100644 index dd96ed9e75..0000000000 --- a/test/win32_default.script.d +++ /dev/null @@ -1,89 +0,0 @@ -/+ dub.json: { - "name": "win32_default_test" -} +/ - -module win32_default.script; - -int main() -{ - import std.stdio; - - version (Windows) - { - version (DigitalMars) - enum disabled = null; - else - enum disabled = "DMD as the host compiler"; - } - else - enum disabled = "Windows"; - - static if (disabled) - { - writeln("Test `win32_default` requires " ~ disabled); - return 0; - } - else - { - import std.algorithm; - import std.path; - import std.process; - - const dir = __FILE_FULL_PATH__.dirName(); - const file = buildPath(dir, "win32_default.d"); - - const dub = environment.get("DUB", buildPath(dirName(dir), "bin", "dub.exe")); - const dmd = environment.get("DMD", "dmd"); - - int exitCode; - - void runTest(scope const string[] cmd) - { - const result = execute(cmd); - - if (result.status || result.output.canFind("Failed")) - { - writefln("\n> %-(%s %)", cmd); - writeln("==========================================================="); - writeln(result.output); - writeln("==========================================================="); - writeln("Last command failed with exit code ", result.status, '\n'); - exitCode = 1; - } - } - - // Test without --arch - runTest([ - dub, "build", - "--compiler", dmd, - "--config", "MsCoff64", - "--single", file, - ]); - - // Test with different --arch - const string[2][] tests = [ - [ "x86", "Default" ], - [ "x86_omf", "MsCoff" ], - [ "x86_mscoff", "MsCoff" ], - [ "x86_64", "MsCoff64" ], - ]; - - foreach (string[2] test; tests) - { - const arch = test[0]; - const config = test[1]; - - runTest([ - dub, "build", - "--compiler", dmd, - "--arch", arch, - "--config", config, - "--single", file, - ]); - } - - - - return exitCode; - } -} From f423ea68b00d1923463600c1f1925ba9992983d8 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sat, 26 Jul 2025 22:14:01 +0300 Subject: [PATCH 181/187] Drop test/version-filters.sh Signed-off-by: Andrei Horodniceanu --- test/version-filters.sh | 8 -------- 1 file changed, 8 deletions(-) delete mode 100755 test/version-filters.sh diff --git a/test/version-filters.sh b/test/version-filters.sh deleted file mode 100755 index e92f3fa099..0000000000 --- a/test/version-filters.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash - -. $(dirname "${BASH_SOURCE[0]}")/common.sh - -$DUB build --root="$CURR_DIR/version-filters" --filter-versions -$DUB build --root="$CURR_DIR/version-filters-diamond" --filter-versions -$DUB build --root="$CURR_DIR/version-filters-source-dep" --filter-versions -$DUB build --root="$CURR_DIR/version-filters-none" --filter-versions From 41bb11832a9ab6a2d52e7fd1a4318beed2bdfe77 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sun, 27 Jul 2025 21:24:34 +0300 Subject: [PATCH 182/187] test/run-unittest.*: Forward to run_unittest Signed-off-by: Andrei Horodniceanu --- test/run-unittest.d | 206 ++++++------------------------------------- test/run-unittest.sh | 90 +------------------ 2 files changed, 30 insertions(+), 266 deletions(-) diff --git a/test/run-unittest.d b/test/run-unittest.d index ae6fad4331..cdae908812 100644 --- a/test/run-unittest.d +++ b/test/run-unittest.d @@ -1,190 +1,36 @@ #!/usr/bin/env dub /+dub.sdl: - name: run_unittest + name: run_unittest_old targetName: run-unittest - dependency "common" path="./common" +/ module run_unittest; -import common; +import std.file; +import std.path; +import std.process; int main(string[] args) { - import std.algorithm, std.file, std.format, std.stdio, std.path, std.process, std.string; - alias ProcessConfig = std.process.Config; - - //** if [ -z ${DUB:-} ]; then - //** die $LINENO 'Variable $DUB must be defined to run the tests.' - //** fi - auto dub = environment.get("DUB", ""); - if (dub == "") - { - logError(`Environment variable "DUB" must be defined to run the tests.`); - return 1; - } - - //** if [ -z ${DC:-} ]; then - //** log '$DC not defined, assuming dmd...' - //** DC=dmd - //** fi - auto dc = environment.get("DC", ""); - if (dc == "") - { - log(`Environment variable "DC" not defined, assuming dmd...`); - dc = "dmd"; - } - - // Clear log file - { - File(logFile, "w"); - } - - //** DC_BIN=$(basename "$DC") - //** CURR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) - //** FRONTEND="${FRONTEND:-}" - const dc_bin = baseName(dc).stripExtension; - const curr_dir = __FILE_FULL_PATH__.dirName(); - const frontend = environment.get("FRONTEND", __VERSION__.format!"%04d"); - - //** if [ "$#" -gt 0 ]; then FILTER=$1; else FILTER=".*"; fi - auto filter = (args.length > 1) ? args[1] : "*"; - version (linux) auto os = "linux"; - version (Windows) auto os = "windows"; - version (OSX) auto os = "osx"; - - version (Posix) - { - //** for script in $(ls $CURR_DIR/*.sh); do - //** if [[ ! "$script" =~ $FILTER ]]; then continue; fi - //** if [ "$script" = "$(gnureadlink ${BASH_SOURCE[0]})" ] || [ "$(basename $script)" = "common.sh" ]; then continue; fi - //** if [ -e $script.min_frontend ] && [ ! -z "$FRONTEND" ] && [ ${FRONTEND} \< $(cat $script.min_frontend) ]; then continue; fi - //** log "Running $script..." - //** DUB=$DUB DC=$DC CURR_DIR="$CURR_DIR" $script || logError "Script failure." - //** done - foreach(DirEntry script; dirEntries(curr_dir, "*.sh", SpanMode.shallow)) - { - if (!script.name.baseName.globMatch(filter)) continue; - if (!script.name.endsWith(".sh")) - continue; - if (baseName(script.name).among("run-unittest.sh", "common.sh")) continue; - const min_frontend = script.name ~ ".min_frontend"; - if (exists(min_frontend) && frontend.length && cmp(frontend, min_frontend.readText) < 0) continue; - log("Running " ~ script ~ "..."); - if (spawnShell(script.name, ["DUB":dub, "DC":dc, "CURR_DIR":curr_dir]).wait) - logError("Script failure."); - else - log(script.name.baseName, " status: Ok"); - } - } - - foreach (DirEntry script; dirEntries(curr_dir, "*.script.d", SpanMode.shallow)) - { - if (!script.name.baseName.globMatch(filter)) continue; - if (!script.name.endsWith(".d")) - continue; - const min_frontend = script.name ~ ".min_frontend"; - if (frontend.length && exists(min_frontend) && cmp(frontend, min_frontend.readText) < 0) continue; - log("Running " ~ script ~ "..."); - if (spawnProcess([dub, script.name], ["DUB":dub, "DC":dc, "CURR_DIR":curr_dir]).wait) - logError("Script failure."); - else - log(script.name, " status: Ok"); - } - - //for pack in $(ls -d $CURR_DIR/*/); do - foreach (DirEntry pack; dirEntries(curr_dir, SpanMode.shallow)) - { - //if [[ ! "$pack" =~ $FILTER ]]; then continue; fi - if (!pack.name.baseName.globMatch(filter)) continue; - if (!pack.isDir || pack.name.baseName.startsWith(".")) continue; - if (!pack.name.buildPath("dub.json").exists && !pack.name.buildPath("dub.sdl").exists && !pack.name.buildPath("package.json").exists) continue; - //if [ -e $pack/.min_frontend ] && [ ! -z "$FRONTEND" -a "$FRONTEND" \< $(cat $pack/.min_frontend) ]; then continue; fi - if (pack.name.buildPath(".min_frontend").exists && cmp(frontend, pack.name.buildPath(".min_frontend").readText) < 0) continue; - - //#First we build the packages - //if [ ! -e $pack/.no_build ] && [ ! -e $pack/.no_build_$DC_BIN ]; then # For sourceLibrary - bool build = (!pack.name.buildPath(".no_build").exists - && !pack.name.buildPath(".no_build_" ~ dc_bin).exists - && !pack.name.buildPath(".no_build_" ~ os).exists); - if (build) - { - //build=1 - //if [ -e $pack/.fail_build ]; then - // log "Building $pack, expected failure..." - // $DUB build --force --root=$pack --compiler=$DC 2>/dev/null && logError "Error: Failure expected, but build passed." - //else - // log "Building $pack..." - // $DUB build --force --root=$pack --compiler=$DC || logError "Build failure." - //fi - //if [ -e $pack/.fail_build ]; then - if (pack.name.buildPath(".fail_build").exists) - { - log("Building " ~ pack.name.baseName ~ ", expected failure..."); - if (spawnProcess([dub, "build", "--force", "--compiler", dc], ["DUB":dub, "DC":dc, "CURR_DIR":curr_dir], ProcessConfig.none, pack.name).wait) - log(pack.name.baseName, " status: Ok"); - else - logError("Failure expected, but build passed."); - } - else - { - log("Building ", pack.name.baseName, "..."); - if (spawnProcess([dub, "build", "--force", "--compiler", dc], ["DUB":dub, "DC":dc, "CURR_DIR":curr_dir], ProcessConfig.none, pack.name).wait) - logError("Script failure."); - else - log(pack.name.baseName, " status: Ok"); - } - } - //else - // build=0 - //fi - - //# We run the ones that are supposed to be run - //if [ $build -eq 1 ] && [ ! -e $pack/.no_run ] && [ ! -e $pack/.no_run_$DC_BIN ]; then - // log "Running $pack..." - // $DUB run --force --root=$pack --compiler=$DC || logError "Run failure." - //fi - if (build - && !pack.name.buildPath(".no_run").exists - && !pack.name.buildPath(".no_run_" ~ dc_bin).exists - && !pack.name.buildPath(".no_run_" ~ os).exists) - { - log("Running ", pack.name.baseName, "..."); - if (spawnProcess([dub, "run", "--force", "--compiler", dc], ["DUB":dub, "DC":dc, "CURR_DIR":curr_dir], ProcessConfig.none, pack.name).wait) - logError("Run failure."); - else - log(pack.name.baseName, " status: Ok"); - } - - //# Finally, the unittest part - //if [ $build -eq 1 ] && [ ! -e $pack/.no_test ] && [ ! -e $pack/.no_test_$DC_BIN ]; then - // log "Testing $pack..." - // $DUB test --force --root=$pack --compiler=$DC || logError "Test failure." - //fi - if (build - && !pack.name.buildPath(".no_test").exists - && !pack.name.buildPath(".no_test_" ~ dc_bin).exists - && !pack.name.buildPath(".no_test_" ~ os).exists) - { - log("Testing ", pack.name.baseName, "..."); - if (spawnProcess([dub, "test", "--force", "--root", pack.name, "--compiler", dc], ["DUB":dub, "DC":dc, "CURR_DIR":curr_dir]).wait) - logError("Test failure."); - else - log(pack.name.baseName, " status: Ok"); - } - //done - } - - //echo - //echo 'Testing summary:' - //cat $(dirname "${BASH_SOURCE[0]}")/test.log - writeln(); - writeln("Testing summary:"); - auto logLines = readText("test.log").splitLines; - foreach (line; logLines) - writeln(line); - auto errCnt = logLines.count!(a => a.startsWith("[ERROR]")); - auto passCnt = logLines.count!(a => a.startsWith("[INFO]") && a.endsWith("status: Ok")); - writeln(passCnt , "/", errCnt + passCnt, " tests succeeded."); - - return any_errors; + immutable dubRoot = environment.get("DUB", __FILE_FULL_PATH__.dirName.dirName); + immutable dub = dubRoot.buildPath("bin", "dub"); + immutable testRoot = dubRoot.buildPath("test"); + immutable runUnittestRoot = testRoot.buildPath("run_unittest"); + + import std.stdio; + writefln("This script is deprecated. Call `dub --root %s` instead", runUnittestRoot); + import core.thread.osthread; + import core.time; + Thread.sleep(1.seconds); + + const cmd = [ + dub, + "run", + "--root=run_unittest", + "--", + "-j1", + ] + ~ args[1 .. $]; + + chdir(testRoot); + return spawnProcess(cmd).wait; } diff --git a/test/run-unittest.sh b/test/run-unittest.sh index 5ef1c1c6d8..22c57406aa 100755 --- a/test/run-unittest.sh +++ b/test/run-unittest.sh @@ -1,88 +1,6 @@ #!/usr/bin/env bash -set -ueo pipefail -. $(dirname "${BASH_SOURCE[0]}")/common.sh - -> $(dirname "${BASH_SOURCE[0]}")/test.log - -function log() { - echo -e "\033[0;33m[INFO] $@\033[0m" - echo "[INFO] $@" >> $(dirname "${BASH_SOURCE[0]}")/test.log -} - -function logError() { - echo -e 1>&2 "\033[0;31m[ERROR] $@\033[0m" - echo "[ERROR] $@" >> $(dirname "${BASH_SOURCE[0]}")/test.log - any_errors=1 -} - -function die() { - logError "$@" - exit 1 -} - -export -f log -export -f die - -if [ -z ${DUB:-} ]; then - die $LINENO 'Variable $DUB must be defined to run the tests.' -fi - -if [ -z ${DC:-} ]; then - log '$DC not defined, assuming dmd...' - DC=dmd -fi - -DC_BIN=$(basename "$DC") -CURR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -FRONTEND="${FRONTEND:-}" - -if [ -z ${FRONTEND:-} ]; then - if [ "$DC_BIN" == "ldc2" ]; then - FRONTEND=$(ldc2 --version | grep 'based on DMD v2.' | sed -E -n 's/^.*DMD v(2\.[0-9]+\.[0-9]).*$/\1/p') - fi - if [ "$DC_BIN" == "dmd" ]; then - FRONTEND=$(dmd --version | grep 'D Compiler v2.' | sed -E -n 's/^.*D Compiler v(2\.[0-9]+\.[0-9]).*$/\1/p') - fi -fi - -echo "Running unittests with $DC_BIN (frontend=$FRONTEND)" - -if [ "$#" -gt 0 ]; then FILTER=$1; else FILTER=".*"; fi - -for pack in $(ls -d $CURR_DIR/*/); do - if [[ ! "$pack" =~ $FILTER ]]; then continue; fi - if [ -f $pack/.min_frontend ] && [ ! -z "$FRONTEND" -a "$FRONTEND" \< $(cat $pack/.min_frontend) ]; then continue; fi - - # First we build the packages - if [ ! -e $pack/.no_build ] && [ ! -e $pack/.no_build_$DC_BIN ]; then # For sourceLibrary - build=1 - if [ -e $pack/.fail_build ]; then - log "Building $pack, expected failure..." - $DUB build --force --root=$pack --compiler=$DC 2>/dev/null && logError "Error: Failure expected, but build passed." - else - log "Building $pack..." - $DUB build --force --root=$pack --compiler=$DC || logError "Build failure." - fi - else - build=0 - fi - - # We run the ones that are supposed to be run - if [ $build -eq 1 ] && [ ! -e $pack/.no_run ] && [ ! -e $pack/.no_run_$DC_BIN ]; then - log "Running $pack..." - $DUB run --force --root=$pack --compiler=$DC || logError "Run failure." - fi - - # Finally, the unittest part - if [ $build -eq 1 ] && [ ! -e $pack/.no_test ] && [ ! -e $pack/.no_test_$DC_BIN ]; then - log "Testing $pack..." - $DUB test --force --root=$pack --compiler=$DC || logError "Test failure." - fi -done - -echo -echo 'Testing summary:' -cat $(dirname "${BASH_SOURCE[0]}")/test.log - -exit ${any_errors:-0} +cd "$(dirname "${0}")" +echo "This script is deprecated. Call \`dub --root ${PWD}/run_unittest\` instead" +sleep 1 +exec "${DUB:-../bin/dub}" run --root=run_unittest -- -j1 "${@}" From 8a2263f0cce5c841db51fe6426709e0a157bd0dc Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Sun, 27 Jul 2025 21:34:13 +0300 Subject: [PATCH 183/187] CI: bump setup-dlang and add gdc test job Signed-off-by: Andrei Horodniceanu --- .github/workflows/main.yml | 37 +++++++++++++++++++++---------------- docker/Dockerfile.alpine | 2 +- scripts/ci/ci.sh | 35 +++++++++++++++++++++++++---------- 3 files changed, 47 insertions(+), 27 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ad9b767e8b..b2ea60486d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -74,6 +74,9 @@ jobs: - { dc: ldc-master, do_test: true } # Test on ARM64 - { os: macOS-14, dc: ldc-latest, do_test: true } + # ice when building tests: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119817 + - { os: ubuntu-24.04, dc: gdc-13, do_test: false } + - { os: ubuntu-24.04, dc: gdc-14, do_test: true } exclude: # Error with those versions: # ld: multiple errors: symbol count from symbol table and dynamic symbol table differ in [.../dub.o]; address=0x0 points to section(2) with no content in '[...]/osx/lib/libphobos2.a[3177](config_a68_4c3.o)' @@ -96,14 +99,29 @@ jobs: - name: '[Linux] Install dependencies' if: runner.os == 'Linux' run: | - sudo apt-get update && sudo apt-get install -y libcurl4-openssl-dev netcat + sudo apt-get update && sudo apt-get install -y libcurl4-openssl-dev netcat-openbsd # Compiler to test with - name: Prepare compiler - uses: dlang-community/setup-dlang@v1 + uses: dlang-community/setup-dlang@v2 with: compiler: ${{ matrix.dc }} + - name: Set environment variables + shell: bash + run: | + for name in DC DMD; do + var=${!name} + var=$(basename "${var}") + var=${var%.exe} # strip the extension + export "${name}=${var}" + tee -a ${GITHUB_ENV} <<<"${name}=${var}" + done + + if [[ ${{ matrix.dc }} == gdc-13 ]]; then + tee -a ${GITHUB_ENV} <<<"DFLAGS=-Wno-error" + fi + # Checkout the repository - name: Checkout uses: actions/checkout@v4 @@ -115,7 +133,6 @@ jobs: run: | dub build --compiler=${{ env.DC }} if [[ ${{ matrix.do_test }} == 'true' ]]; then - dub run --compiler=${{ env.DC }} --single test/issue2051_running_unittests_from_dub_single_file_packages_fails.d ./scripts/ci/ci.sh fi @@ -127,19 +144,7 @@ jobs: dub build --compiler=${{ env.DC }} if [[ ${{ matrix.do_test }} == 'true' ]]; then dub test --compiler=${{ env.DC }} - dub run --compiler=${{ env.DC }} --single test/issue2051_running_unittests_from_dub_single_file_packages_fails.d - dub --single test/run-unittest.d - - # FIXME: DMD fails a few tests on Windows; remove them for now - if [[ '${{ matrix.dc }}' = dmd* ]]; then - # DLL support is lacking - rm -rf test/{1-dynLib-simple,2-dynLib-dep,2-dynLib-with-staticLib-dep} - # Unicode in paths too - rm -rf test/issue130-unicode-СНА* - # ImportC probably requires set-up MSVC environment variables - rm -rf test/use-c-sources - fi - test/run-unittest.sh + dub run --root test/run_unittest -- -v fi shell: bash diff --git a/docker/Dockerfile.alpine b/docker/Dockerfile.alpine index 1ca99412e5..dae902d858 100644 --- a/docker/Dockerfile.alpine +++ b/docker/Dockerfile.alpine @@ -20,4 +20,4 @@ ENV DC=$DCBIN # Finally, just run the test-suite WORKDIR /root/build/test/ -ENTRYPOINT [ "/root/build/test/run-unittest.sh" ] +ENTRYPOINT [ "/root/build/bin/dub", "--root", "run_unittest", "--" ] diff --git a/scripts/ci/ci.sh b/scripts/ci/ci.sh index bccfd811e7..bc77d70514 100755 --- a/scripts/ci/ci.sh +++ b/scripts/ci/ci.sh @@ -2,21 +2,36 @@ set -v -e -o pipefail -vibe_ver=$(jq -r '.versions | .["vibe-d"]' < dub.selections.json) -dub fetch vibe-d@$vibe_ver # get optional dependency -dub test --compiler=${DC} -c library-nonet +testLibraryNonet=1 +if [[ ${DC} =~ gdc|gdmd ]]; then + # ICE with gdc-14 + testLibraryNonet= +fi + +if [[ ${testLibraryNonet} ]]; then + vibe_ver=$(jq -r '.versions | .["vibe-d"]' < dub.selections.json) + dub fetch vibe-d@$vibe_ver # get optional dependency + dub test --compiler=${DC} -c library-nonet --build=unittest +fi export DMD="$(command -v $DMD)" -./build.d -preview=in -w -g -debug +"${DMD}" -run build.d -preview=in -w -g -debug + +if [[ ${testLibraryNoNet} ]]; then + dub test --compiler=${DC} -b unittest-cov +fi if [ "$COVERAGE" = true ]; then # library-nonet fails to build with coverage (Issue 13742) - dub test --compiler=${DC} -b unittest-cov - ./build.d -cov + "${DMD}" -run build.d -cov else - dub test --compiler=${DC} -b unittest-cov - ./build.d + "${DMD}" -run build.d fi -DUB=`pwd`/bin/dub DC=${DC} dub --single ./test/run-unittest.d -DUB=`pwd`/bin/dub DC=${DC} test/run-unittest.sh + +# force the creation of the coverage dir +bin/dub --version + +# let the runner add the needed flags, in the case of gdmd +unset DFLAGS +DC=${DMD} dub run --root test/run_unittest -- -v From d999723bcc22e293022e772ebac6ec297cc65c1a Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Wed, 30 Jul 2025 18:29:48 +0300 Subject: [PATCH 184/187] docker: install lld for ldc ldc2 on alpine is configured to use the lld linker, however, the lld package is not pulled in as a dependency. Signed-off-by: Andrei Horodniceanu --- docker/Dockerfile.alpine | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/Dockerfile.alpine b/docker/Dockerfile.alpine index dae902d858..286d06afbf 100644 --- a/docker/Dockerfile.alpine +++ b/docker/Dockerfile.alpine @@ -7,7 +7,7 @@ ARG DCBIN # Build dub (and install tests dependencies in the process) WORKDIR /root/build/ -RUN apk add --no-cache bash build-base curl curl-dev dtools dub git grep rsync $DCPKG +RUN apk add --no-cache bash build-base curl curl-dev dtools dub git grep rsync lld $DCPKG ADD . /root/build/ RUN dub test --compiler=$DCBIN && dub build --compiler=$DCBIN From 82f8f7a5fc5e75f7f2e4b78ea8146d92d6a2b969 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Fri, 22 Aug 2025 16:31:38 +0300 Subject: [PATCH 185/187] test: Drop old common Signed-off-by: Andrei Horodniceanu --- test/common.sh | 58 ------------------------------------- test/common/.no_build | 0 test/common/.no_run | 0 test/common/.no_test | 0 test/common/dub.sdl | 6 ---- test/common/source/common.d | 40 ------------------------- 6 files changed, 104 deletions(-) delete mode 100644 test/common.sh delete mode 100644 test/common/.no_build delete mode 100644 test/common/.no_run delete mode 100644 test/common/.no_test delete mode 100644 test/common/dub.sdl delete mode 100644 test/common/source/common.d diff --git a/test/common.sh b/test/common.sh deleted file mode 100644 index 054f00739c..0000000000 --- a/test/common.sh +++ /dev/null @@ -1,58 +0,0 @@ -SOURCE_FILE=$_ - -set -ueEo pipefail - -function log() { - echo -e "\033[0;33m[INFO] $@\033[0m" - echo "[INFO] $@" >> $(dirname "${BASH_SOURCE[0]}")/test.log -} - -# lineno[, msg] -function die() { - local line=$1 - local msg=${2:-command failed} - local supplemental=${3:-} - echo "[ERROR] $SOURCE_FILE:$1 $msg" | tee -a $(dirname "${BASH_SOURCE[0]}")/test.log | cat 1>&2 - if [ ! -z "$supplemental" ]; then - echo "$supplemental" | >&2 sed 's|^| |g' - fi - exit 1 -} -trap 'die $LINENO' ERR - -# Get a random port for the test to use -# This isn't foolproof but should fail less than handcrafted approaches -function getRandomPort() { - # Get the PID of this script as a way to get a random port, - # and make sure the value is > 1024, as ports < 1024 are priviledged - # and require root priviledges. - # We also need to make sure the value is not > ushort.max - PORT=$(($$ % 65536)) - if [ $PORT -le 1024 ]; then - PORT=$(($PORT + 1025)) - fi - echo $PORT -} - -# Emulate GNU readlink's behavior on non-GNU readlink (e.g. MacOSX / BSD's) -# Credit to https://stackoverflow.com/a/1116890 -function gnureadlink() { - TARGET_FILE=$1 - - cd `dirname $TARGET_FILE` - TARGET_FILE=`basename $TARGET_FILE` - - # Iterate down a (possible) chain of symlinks - while [ -L "$TARGET_FILE" ] - do - TARGET_FILE=`readlink $TARGET_FILE` - cd `dirname $TARGET_FILE` - TARGET_FILE=`basename $TARGET_FILE` - done - - # Compute the canonicalized name by finding the physical path - # for the directory we're in and appending the target file. - PHYS_DIR=`pwd -P` - RESULT=$PHYS_DIR/$TARGET_FILE - echo $RESULT -} diff --git a/test/common/.no_build b/test/common/.no_build deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/common/.no_run b/test/common/.no_run deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/common/.no_test b/test/common/.no_test deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/common/dub.sdl b/test/common/dub.sdl deleted file mode 100644 index 07cd17547c..0000000000 --- a/test/common/dub.sdl +++ /dev/null @@ -1,6 +0,0 @@ -name "common" -description "Utility package for test suite" -authors "drug007" -copyright "The D language Foundation" -license "BSL-1.0" -targetType "sourceLibrary" diff --git a/test/common/source/common.d b/test/common/source/common.d deleted file mode 100644 index 796a05958d..0000000000 --- a/test/common/source/common.d +++ /dev/null @@ -1,40 +0,0 @@ -module common; - -import std.conv : text; -import std.stdio : File, stdout, stderr; - -/// Name of the log file -enum logFile = "test.log"; - -/// has true if some test fails -bool any_errors = false; - -/// prints (non error) message to standard output and log file -void log(Args...)(Args args) - if (Args.length) -{ - const str = text("[INFO] ", args); - version(Windows) stdout.writeln(str); - else stdout.writeln("\033[0;33m", str, "\033[0m"); - stdout.flush; - File(logFile, "a").writeln(str); -} - -/// prints error message to standard error stream and log file -/// and set any_errors var to true value to indicate that some -/// test fails -void logError(Args...)(Args args) -{ - const str = text("[ERROR] ", args); - version(Windows) stderr.writeln(str); - else stderr.writeln("\033[0;31m", str, "\033[0m"); - stderr.flush; - File(logFile, "a").writeln(str); - any_errors = true; -} - -void die(Args...)(Args args) -{ - stderr.writeln(args); - throw new Exception("Test failed"); -} From 4a519665d461992f4bcc78a8bf77731a56700c32 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Fri, 22 Aug 2025 17:06:28 +0300 Subject: [PATCH 186/187] mv new_tests -> test Signed-off-by: Andrei Horodniceanu --- test/.gitignore | 75 +++--------------- test/{new_tests => }/0-init-fail-json/dub.sdl | 0 .../0-init-fail-json/source/app.d | 0 test/{new_tests => }/0-init-fail/dub.sdl | 0 test/{new_tests => }/0-init-fail/source/app.d | 0 .../0-init-interactive/.gitignore | 0 .../0-init-interactive/dub.sdl | 0 .../exp/default_name.dub.sdl | 0 .../0-init-interactive/exp/dub.json | 0 .../0-init-interactive/exp/dub.sdl | 0 .../exp/license_gpl3.dub.sdl | 0 .../exp/license_mpl2.dub.sdl | 0 .../exp/license_proprietary.dub.sdl | 0 .../0-init-interactive/source/app.d | 0 .../{new_tests => }/0-init-multi-json/dub.sdl | 0 .../0-init-multi-json/source/app.d | 0 test/{new_tests => }/0-init-multi/dub.sdl | 0 .../{new_tests => }/0-init-multi/source/app.d | 0 .../0-init-simple-json/dub.sdl | 0 .../0-init-simple-json/source/app.d | 0 test/{new_tests => }/0-init-simple/dub.sdl | 0 .../0-init-simple/source/app.d | 0 test/{new_tests => }/1-dynLib-simple/dub.json | 0 .../1-dynLib-simple/source/dynlib/app.d | 0 .../1-dynLib-simple/test.config | 0 .../1-exec-simple-package-json/package.json | 0 .../1-exec-simple-package-json/source/app.d | 0 test/{new_tests => }/1-exec-simple/dub.json | 0 .../1-exec-simple/source/app.d | 0 .../1-staticLib-simple/dub.json | 0 .../1-staticLib-simple/source/staticlib/app.d | 0 .../1-staticLib-simple/test.config | 0 test/{new_tests => }/2-dynLib-dep/dub.json | 0 .../{new_tests => }/2-dynLib-dep/source/app.d | 0 test/{new_tests => }/2-dynLib-dep/test.config | 0 .../2-dynLib-with-staticLib-dep/dub.json | 0 .../source/dynlib/app.d | 0 .../2-dynLib-with-staticLib-dep/test.config | 0 test/{new_tests => }/2-sourceLib-dep/dub.json | 0 .../2-sourceLib-dep/source/app.d | 0 test/{new_tests => }/2-staticLib-dep/dub.json | 0 .../2-staticLib-dep/source/app.d | 0 .../2-staticLib-dep/test.config | 0 test/{new_tests => }/3-copyFiles/.gitignore | 0 .../3-copyFiles/data/file_to_copy.txt | 0 .../3-copyFiles/data/file_to_copy_mask1.txt | 0 .../3-copyFiles/data/file_to_copy_mask2.txt | 0 .../.nocopy/file_inside_dot_prefixed_dir.txt | 0 .../3-copyFiles/data/res/hdpi/file1.txt | 0 .../3-copyFiles/data/res/hdpi/file2.txt | 0 .../3-copyFiles/data/res/hdpi/file3.txt | 0 .../data/res/hdpi/nested_dir/nested_file.txt | 0 .../3-copyFiles/data/res/i18n/resource_en.txt | 0 .../3-copyFiles/data/res/i18n/resource_fr.txt | 0 .../3-copyFiles/data/res/ldpi/file1.txt | 0 .../3-copyFiles/data/res/ldpi/file2.txt | 0 .../3-copyFiles/data/res/ldpi/file3.txt | 0 .../3-copyFiles/data/res/mdpi/file1.txt | 0 .../3-copyFiles/data/res/mdpi/file2.txt | 0 .../3-copyFiles/data/res/mdpi/file3.txt | 0 test/{new_tests => }/3-copyFiles/dub.json | 0 test/{new_tests => }/3-copyFiles/source/app.d | 0 .../4-describe-data-1-list/dub.json | 0 .../4-describe-data-1-list/source/app.d | 0 .../4-describe-data-1-list/test.config | 0 .../4-describe-data-2-dmd/dub.json | 0 .../4-describe-data-2-dmd/source/app.d | 0 .../4-describe-data-2-dmd/test.config | 0 .../4-describe-data-3-zero-delim/dub.json | 0 .../4-describe-data-3-zero-delim/source/app.d | 0 .../4-describe-data-3-zero-delim/test.config | 0 .../4-describe-import-paths/dub.json | 0 .../4-describe-import-paths/source/app.d | 0 .../4-describe-import-paths/test.config | 0 test/{new_tests => }/4-describe-json/dub.json | 0 .../4-describe-json/source/app.d | 0 .../4-describe-json/test.config | 0 .../4-describe-string-import-paths/dub.json | 0 .../source/app.d | 0 .../test.config | 0 .../5-convert-stdout/.gitignore | 0 .../{new_tests => }/5-convert-stdout/dub.json | 0 .../5-convert-stdout/sample/dub.json | 0 .../5-convert-stdout/source/app.d | 0 test/{new_tests => }/5-convert/.gitignore | 0 test/{new_tests => }/5-convert/dub.json | 0 test/{new_tests => }/5-convert/sample/dub.sdl | 0 test/{new_tests => }/5-convert/source/app.d | 0 test/{new_tests => }/README.md | 0 .../cache-generated-test-config/.gitignore | 0 .../cache-generated-test-config/dub.json | 0 .../sample/dub.sdl | 0 .../sample/source/test.d | 0 .../cache-generated-test-config/source/app.d | 0 .../{new_tests => }/colored-output/.gitignore | 0 test/{new_tests => }/colored-output/dub.json | 0 .../colored-output/sample/dub.sdl | 0 .../colored-output/sample/source/lib.d | 0 .../colored-output/source/app.d | 0 .../colored-output/test.config | 0 test/{new_tests => }/common/dub.json | 0 test/{new_tests => }/common/source/common.d | 0 test/{new_tests => }/cov-ctfe/.gitignore | 0 test/{new_tests => }/cov-ctfe/dub.sdl | 0 test/{new_tests => }/cov-ctfe/test.config | 0 test/{new_tests => }/cov-ctfe/test.d | 0 .../custom-source-main-bug487/.gitignore | 0 .../custom-source-main-bug487/dub.json | 0 .../custom-source-main-bug487/mysrc/app.d | 0 .../custom-source-main-bug487/test.config | 0 .../custom-unittest/.gitignore | 0 test/{new_tests => }/custom-unittest/dub.json | 0 .../custom-unittest/source/app.d | 0 .../custom-unittest/source/lib.d | 0 .../custom-unittest/test.config | 0 .../custom-unittest/test/main.d | 0 test/{new_tests => }/d-versions/.gitignore | 0 test/{new_tests => }/d-versions/dub.json | 0 .../{new_tests => }/d-versions/sample/dub.sdl | 0 .../d-versions/sample/source/app.d | 0 test/{new_tests => }/d-versions/source/app.d | 0 test/{new_tests => }/ddox/.gitignore | 0 test/{new_tests => }/ddox/custom-tool/dub.sdl | 0 .../ddox/custom-tool/public/copied | 0 .../ddox/custom-tool/source/app.d | 0 test/{new_tests => }/ddox/custom/dub.sdl | 0 .../ddox/custom/source/ddox_project.d | 0 test/{new_tests => }/ddox/default/dub.sdl | 0 .../ddox/default/source/ddox_project.d | 0 test/{new_tests => }/ddox/dub.json | 0 test/{new_tests => }/ddox/source/app.d | 0 .../depen-build-settings/.gitignore | 0 .../depend/depend2/dub.json | 0 .../depend/depend2/source/depend2.d | 0 .../depen-build-settings/depend/dub.json | 0 .../depend/source/depend.d | 0 .../depen-build-settings/dub.json | 0 .../depen-build-settings/dub.selections.json | 0 .../depen-build-settings/source/app.d | 0 .../depen-build-settings/test.config | 0 .../{new_tests => }/dest-directory/.gitignore | 0 test/{new_tests => }/dest-directory/dub.json | 0 .../dest-directory/sample/dub.sdl | 0 .../dest-directory/sample/source/app.d | 0 .../dest-directory/source/app.d | 0 .../{new_tests => }/dpath-variable/.gitignore | 0 test/{new_tests => }/dpath-variable/dub.json | 0 .../dpath-variable/sample/dub.json | 0 .../dpath-variable/sample/source/app.d | 0 .../dpath-variable/source/app.d | 0 .../dub-as-a-library-cwd/.gitignore | 0 .../dub-as-a-library-cwd/dub.json | 0 .../dub-as-a-library-cwd/sample/dub.json | 2 +- .../dub-as-a-library-cwd/sample/source/app.d | 0 .../sample/subproject/dub.sdl | 0 .../sample/subproject/source/app.d | 0 .../dub-as-a-library-cwd/source/app.d | 0 .../dub-custom-root/.gitignore | 0 .../dub-custom-root/custom-root-2/dub.json | 0 .../custom-root-2/source/app.d | 3 +- .../dub-custom-root/custom-root/dub.json | 0 .../dub-custom-root/custom-root/source/app.d | 1 - test/{new_tests => }/dub-custom-root/dub.json | 0 .../dub-custom-root/source/app.d | 0 test/{new_tests => }/dub_test_root/dub.json | 0 .../dub_test_root/source/app.d | 0 .../dustmite-no-redirect/.gitignore | 0 .../dustmite-no-redirect/dub.json | 0 .../dustmite-no-redirect/sample/dub.json | 0 .../dustmite-no-redirect/sample/source/app.d | 0 .../dustmite-no-redirect/source/app.d | 0 .../environment-variables/.gitignore | 0 .../environment-variables/dub.json | 0 .../sample/deppkg/dub.json | 0 .../sample/deppkg/source/deppkg/foo.d | 0 .../environment-variables/sample/dub.json | 0 .../sample/dub.settings.json | 0 .../environment-variables/sample/source/app.d | 0 .../environment-variables/source/app.d | 0 test/{new_tests => }/extra/.gitignore | 0 .../extra/1-sourceLib-simple/dub.json | 0 .../1-sourceLib-simple/source/sourcelib/app.d | 0 .../extra/4-describe/.gitignore | 0 .../dependency-1/data/dummy-dep1.dat | 0 .../dependency-postGenerateCommands.sh | 0 .../dependency-preGenerateCommands.sh | 0 .../extra/4-describe/dependency-1/dub.json | 0 .../4-describe/dependency-1/otherdir/dummy.d | 0 .../4-describe/dependency-1/source/dummy.d | 0 .../extra/4-describe/dependency-2/dub.json | 0 .../some-extra-string-import-path/dummy.d | 0 .../4-describe/dependency-2/some-path/dummy.d | 0 .../dependency-3/dep3-source/dummy.d | 0 .../dep3-string-import-path/dummy.d | 0 .../extra/4-describe/dependency-3/dub.json | 0 .../extra/4-describe/project/data/dummy.dat | 0 .../project/do-postGenerateCommands.sh | 0 .../project/do-preGenerateCommands.sh | 0 .../extra/4-describe/project/dub.json | 0 .../extra/4-describe/project/src/dummy.d | 0 .../extra/4-describe/project/views/dummy.d | 0 .../extra/4-describe/test-utils/dub.json | 0 .../test-utils/source/describe_test_utils.d | 0 .../extra/issue1336-registry/.gitignore | 0 ...5D&include_dependencies=true&minimize=true | 0 .../gitcompatibledubpackage/1.0.2.zip | 0 .../gitcompatibledubpackage/1.0.3.zip | 0 .../gitcompatibledubpackage/1.0.4.zip | Bin .../.gitignore | 0 .../1.0.5/maven-dubpackage-1.0.5.zip | Bin .../1.0.6/maven-dubpackage-1.0.6.zip | Bin .../maven-dubpackage/maven-metadata.xml | 0 .../extra/test_registry/.gitignore | 0 .../extra/test_registry/dub.json | 0 .../source/test_registry_helper.d | 0 .../extra/test_registry/test_registry.d | 0 test/{new_tests => }/feat663-search/dub.json | 0 .../feat663-search/source/app.d | 0 test/{new_tests => }/fetchzip/dub.json | 0 test/{new_tests => }/fetchzip/source/app.d | 0 test/{new_tests => }/fetchzip/test.config | 0 .../.gitignore | 0 .../dub.json | 0 .../fs-json-dubpackage-1.0.7+build-9-9-9.zip | Bin .../source/app.d | 0 test/{new_tests => }/frameworks/dub.sdl | 0 test/{new_tests => }/frameworks/source/app.d | 0 test/{new_tests => }/frameworks/test.config | 0 .../{new_tests => }/git-dependency/.gitignore | 0 test/{new_tests => }/git-dependency/dub.json | 0 test/{new_tests => }/git-dependency/src/app.d | 0 test/{new_tests => }/help/dub.json | 0 test/{new_tests => }/help/source/app.d | 0 .../ignore-hidden-1/.gitignore | 0 test/{new_tests => }/ignore-hidden-1/dub.json | 0 .../ignore-hidden-1/source/.hidden.d | 0 .../ignore-hidden-1/source/app.d | 0 .../ignore-hidden-1/test.config | 0 .../ignore-hidden-2/.gitignore | 0 test/{new_tests => }/ignore-hidden-2/dub.json | 0 .../ignore-hidden-2/source/.hidden.d | 0 .../ignore-hidden-2/source/app.d | 0 .../ignore-hidden-2/test.config | 0 .../ignore-useless-arch-switch/dub.sdl | 0 .../ignore-useless-arch-switch/source/app.d | 0 .../injected-from-dependency/.gitignore | 0 .../injected-from-dependency/ahook.d | 0 .../injected-from-dependency/dub.json | 0 .../injected-from-dependency/source/entry.d | 0 .../injected-from-dependency/toload/vars.d | 0 .../interactive-remove/dub.json | 0 .../interactive-remove/source/app.d | 0 .../issue1003-check-empty-ld-flags/dub.json | 0 .../source/app.d | 0 .../test.config | 0 .../issue1004-override-config/.gitignore | 0 .../issue1004-override-config/dub.json | 0 .../issue1004-override-config/sample/a/a.d | 0 .../sample/a/dub.sdl | 0 .../sample/main/dub.sdl | 0 .../sample/main/source/main.d | 0 .../issue1004-override-config/source/app.d | 0 .../.gitignore | 0 .../dub.json | 0 .../sample/a/dub.sdl | 0 .../sample/b/dub.sdl | 0 .../sample/b/source/b.d | 0 .../sample/c/dub.sdl | 0 .../sample/main/dub.sdl | 0 .../sample/main/source/app.d | 0 .../source/app.d | 0 .../issue1024-selective-upgrade/.gitignore | 0 .../issue1024-selective-upgrade/dub.json | 0 .../sample/a-1.0.0/dub.sdl | 0 .../sample/a-1.0.1/dub.sdl | 0 .../sample/b-1.0.0/dub.sdl | 0 .../sample/b-1.0.1/dub.sdl | 0 .../sample/main/dub.sdl | 0 .../issue1024-selective-upgrade/source/app.d | 0 .../issue103-single-file-package/.gitignore | 0 .../issue103-single-file-package/dub.json | 0 .../sample/json.d | 0 .../sample/no-ext | 2 +- .../issue103-single-file-package/sample/sdl.d | 2 +- .../sample/w-dep.d | 0 .../issue103-single-file-package/source/app.d | 0 .../.gitignore | 0 .../dub.json | 0 .../sample/b/dub.json | 0 .../sample/dub.json | 0 .../source/app.d | 0 .../issue1040-run-with-ver/dub.json | 0 .../issue1040-run-with-ver/source/app.d | 0 .../issue1053-extra-files-visuald/.gitignore | 0 .../issue1053-extra-files-visuald/dub.json | 0 .../sample/dub.json | 0 .../sample/shaders/saturate.vert | 0 .../sample/shaders/warp.geom | 0 .../sample/source/app.d | 0 .../sample/text/LICENSE.txt | 0 .../sample/text/README.txt | 0 .../source/app.d | 0 .../.gitignore | 0 .../dub.json | 0 .../sample/source/.empty | 0 .../source/app.d | 0 .../issue1091-bogus-rebuild/.gitignore | 0 .../issue1091-bogus-rebuild/dub.json | 0 .../issue1091-bogus-rebuild/sample/dub.sdl | 0 .../sample/source/app.d | 0 .../issue1091-bogus-rebuild/source/app.d | 0 .../.gitignore | 0 .../issue1117-extra-dependency-files/dub.json | 0 .../sample/dependency.txt | 0 .../sample/dub.json | 0 .../sample/source/app.d | 0 .../source/app.d | 0 .../issue1136-temp-copy-files/.gitignore | 0 .../issue1136-temp-copy-files/dub.json | 0 .../issue1136-temp-copy-files/sample/app.d | 0 .../sample/mylib/dub.sdl | 0 .../sample/mylib/helloworld.txt | 0 .../issue1136-temp-copy-files/source/app.d | 0 .../.gitignore | 0 .../issue1158-stdin-for-single-files/dub.json | 0 .../source/app.d | 0 .../issue1158-stdin-for-single-files/stdin.d | 0 .../issue1180-local-cache-broken/.gitignore | 0 .../issue1180-local-cache-broken/dub.json | 0 .../sample/dub.json | 0 .../sample/source/app.d | 0 .../issue1180-local-cache-broken/source/app.d | 0 .../issue1180-local-cache-broken/test.config | 0 .../issue1194-warn-wrong-subconfig/.gitignore | 0 .../issue1194-warn-wrong-subconfig/dub.json | 0 .../sample/dub.sdl | 0 .../sample/source/app.d | 0 .../source/app.d | 0 .../.gitignore | 0 .../daughter/dub.sdl | 0 .../daughter/source/dummy.d | 0 .../diamond/dub.sdl | 0 .../diamond/source/dummy.d | 0 .../dub.sdl | 0 .../son/dub.sdl | 0 .../son/source/dummy.d | 0 .../source/app.d | 0 .../test.config | 0 .../issue1262-version-inheritance/.gitignore | 0 .../daughter/dub.sdl | 0 .../daughter/source/dummy.d | 0 .../issue1262-version-inheritance/dub.sdl | 0 .../issue1262-version-inheritance/son/dub.sdl | 0 .../son/source/dummy.d | 0 .../source/app.d | 0 .../issue1262-version-inheritance/test.config | 0 test/{new_tests => }/issue1277/.gitignore | 0 test/{new_tests => }/issue1277/dub.json | 0 .../issue1277/sample/source/app.d | 0 test/{new_tests => }/issue1277/source/app.d | 0 .../dub.sdl" | 0 .../source/app.d" | 0 .../issue1350-transitive-none-deps/.gitignore | 0 .../common-dep/common.d | 0 .../common-dep/dub.sdl | 0 .../common-none/dub.sdl | 0 .../dep1/dep1.d | 0 .../dep1/dub.sdl | 0 .../dep2/dep2.d | 0 .../dep2/dub.sdl | 0 .../issue1350-transitive-none-deps/dub.sdl | 0 .../test.config | 0 .../issue1350-transitive-none-deps/test.d | 0 .../.gitignore | 0 .../dub.json | 0 .../sample/.hiddensource/hello.d | 0 .../sample/dub.json | 0 .../sample/source/.AppleDouble/app.d | 0 .../sample/source/.compileMe/hello.d | 0 .../sample/source/app.d | 0 .../source/app.d | 0 .../.gitignore | 0 .../issue1396-pre-post-run-commands/dub.json | 0 .../sample/dub.sdl | 0 .../sample/post-run.sh | 0 .../sample/source/app.d | 0 .../source/app.d | 0 .../test.config | 0 .../.gitignore | 0 .../dub.json | 0 .../sample/fs-json-dubpackage-1.0.7.zip | Bin .../sample/fs-sdl-dubpackage-1.0.5.zip | Bin .../sample/fs-sdl-dubpackage-1.0.6.zip | Bin .../source/app.d | 0 .../issue1408-inherit-linker-files/.gitignore | 0 .../issue1408-inherit-linker-files/dep.d | 0 .../issue1408-inherit-linker-files/dub.sdl | 0 .../issue1408-inherit-linker-files/lib.d | 0 .../lib/dub.sdl | 0 .../issue1408-inherit-linker-files/lib/lib.d | 0 .../issue1408-inherit-linker-files/main.d | 0 .../test.config | 0 .../dub.json | 0 .../source/app.d | 0 .../test.config | 0 .../issue1427-betterC/dub.json | 0 .../issue1427-betterC/source/app.d | 0 .../issue1447-build-settings-vars/.gitignore | 0 .../issue1447-build-settings-vars/dub.json | 0 .../sample/dub.json | 0 .../sample/source/app.d | 0 .../sample/view-aarch64/arch | 0 .../sample/view-x86/arch | 0 .../sample/view-x86_64/arch | 0 .../source/app.d | 0 .../issue1447-build-settings-vars/test.config | 0 .../issue1474-generate-source/.gitignore | 0 .../issue1474-generate-source/dub.json | 0 .../issue1474-generate-source/sample/dub.json | 0 .../sample/ext/kekw.d | 0 .../sample/source/app.d | 0 .../issue1474-generate-source/source/app.d | 0 .../.gitignore | 0 .../dub.json | 0 .../sample/dub.sdl | 0 .../sample/source/library.d | 0 .../sample/sub/subpackage_a/dub.sdl | 0 .../sub/subpackage_a/source/subpackage_a.d | 0 .../source/app.d | 0 .../issue1504-envvar-in-path/.gitignore | 0 .../issue1504-envvar-in-path/dub.json | 0 .../issue1504-envvar-in-path/sample/dub.json | 0 .../sample/source/app.d | 0 .../sample/teststrings/message.txt | 0 .../issue1504-envvar-in-path/source/app.d | 0 .../.gitignore | 0 .../dub.json | 0 .../sample.d | 0 .../source/app.d | 0 .../.gitignore | 0 .../dub.json | 0 .../sample/dub.json | 0 .../1.0.5/maven-dubpackage-a-1.0.5.zip | Bin .../maven-dubpackage-a/maven-metadata.xml | 0 .../1.0.6/maven-dubpackage-b-1.0.6.zip | Bin .../maven-dubpackage-b/maven-metadata.xml | 0 .../sample/source/app.d | 0 .../source/app.d | 0 .../test.config | 0 .../issue1531-toolchain-requirements/dub.json | 0 .../source/app.d | 0 .../issue1551-var-escaping/dub.json | 0 .../issue1551-var-escaping/source/app.d | 0 .../issue1556-fetch-and-build/.gitignore | 0 .../issue1556-fetch-and-build/dub.json | 0 .../sample/dependency-package-1.0.0.zip | Bin .../sample/main-package-1.0.0.zip | Bin .../issue1556-fetch-and-build/source/app.d | 0 .../issue1567-fetch-sub-package/.gitignore | 0 .../issue1567-fetch-sub-package/dub.json | 0 .../fetch-sub-package-dubpackage-1.0.1.zip | Bin .../issue1567-fetch-sub-package/source/app.d | 0 .../issue1574-addcommand/dub.json | 0 .../issue1574-addcommand/source/app.d | 0 .../issue1574-addcommand/test.config | 0 .../issue1636-betterC-dub-test/.gitignore | 0 .../issue1636-betterC-dub-test/dub.json | 0 .../sample/dub.json | 0 .../sample/source/lib.d | 0 .../issue1636-betterC-dub-test/source/app.d | 0 .../issue1645-dflags-build/dub.json | 0 .../issue1645-dflags-build/source/app.d | 0 .../issue1645-dflags-build/test.config | 0 .../issue1651-custom-dub-init-type/.gitignore | 0 .../issue1651-custom-dub-init-type/dub.json | 0 .../custom-dub-init-dubpackage-1.0.1.zip | Bin .../source/app.d | 0 .../issue1691-build-subpkg/.gitignore | 0 .../issue1691-build-subpkg/dub.json | 0 .../issue1691-build-subpkg/sample/dub.sdl | 0 .../sample/source/app.d | 0 .../sample/subpkg/dub.sdl | 0 .../sample/subpkg/source/subpkg.d | 0 .../issue1691-build-subpkg/source/app.d | 0 .../.gitignore | 0 .../issue1739-project-settings-file/dub.json | 0 .../sample/single.d | 0 .../source/app.d | 0 .../{new_tests => }/issue1773-lint/.gitignore | 0 test/{new_tests => }/issue1773-lint/dub.json | 0 .../issue1773-lint/sample/dub.json | 0 .../issue1773-lint/sample/source/app.d | 0 .../issue1773-lint/source/app.d | 0 test/{new_tests => }/issue1775/.gitignore | 0 test/{new_tests => }/issue1775/dub.json | 0 .../issue1775/issue1775.marker | 0 test/{new_tests => }/issue1775/source/app.d | 0 .../.gitignore | 0 .../b/dub.sdl | 0 .../b/source/b/foo.d | 0 .../b/views/layout.diet | 0 .../c/dub.sdl | 0 .../c/source/dummy.d | 0 .../c/views/fancylayout.diet | 0 .../dub.sdl | 0 .../source/app.d | 0 .../views/layout.diet | 0 .../issue1856-build-unittest/.gitignore | 0 .../issue1856-build-unittest/dub.json | 0 .../issue1856-build-unittest/sample/full_ut.d | 0 .../issue1856-build-unittest/sample/no_ut.d | 0 .../sample/partial_ut.d | 0 .../sample/partial_ut2.d | 0 .../issue1856-build-unittest/source/app.d | 0 .../issue1867-lowmem/.gitignore | 0 .../{new_tests => }/issue1867-lowmem/dub.json | 0 .../issue1867-lowmem/sample/dub.sdl | 0 .../issue1867-lowmem/sample/dub.settings.json | 0 .../issue1867-lowmem/sample/source/app.d | 0 .../issue1867-lowmem/source/app.d | 0 .../issue2012-dc-env/.gitignore | 0 .../{new_tests => }/issue2012-dc-env/dub.json | 0 .../issue2012-dc-env/sample/app.d | 0 .../issue2012-dc-env/source/app.d | 0 .../.gitignore | 0 .../dub.json | 0 .../sample/dub.json | 0 .../sample/dub.selections.json-nofoo | 0 .../sample/dub.selections.json-usefoo | 0 .../sample/libbar/dub.json | 0 .../sample/libbar/source/libbar/bar.d | 0 .../sample/libfoo/dub.json | 0 .../sample/libfoo/source/libfoo/foo.d | 0 .../sample/source/app.d | 0 .../source/app.d | 0 .../.gitignore | 0 .../dub.json | 0 .../single_failure.d | 0 .../single_success.d | 0 .../source/app.d | 0 .../issue2085-target-none-visuald/.gitignore | 0 .../issue2085-target-none-visuald/dub.json | 0 .../sample/dub.json | 0 .../sample/sub/dub.json | 0 .../sample/sub/source/app.d | 0 .../source/app.d | 0 .../.gitignore | 0 .../dub.json | 0 .../sample/dub.json | 0 .../sample/sub/dub.json | 0 .../sample/sub/files/to_be_deployed.txt | 0 .../sample/sub/source/app.d | 0 .../source/app.d | 0 .../issue2190-unset-TEMP/.gitignore | 0 .../issue2190-unset-TEMP/dub.json | 0 .../issue2190-unset-TEMP/single.d | 0 .../issue2190-unset-TEMP/source/app.d | 0 .../issue2190-unset-TEMP/test.config | 0 .../.gitignore | 0 .../issue2192-environment-variables/dub.json | 0 .../sample/dub.sdl | 0 .../sample/source/lib.d | 0 .../source/app.d | 0 .../issue2234-copy-read-only-files/.gitignore | 0 .../issue2234-copy-read-only-files/dub.json | 0 .../sample/dub.json | 0 .../sample/files/images/to_be_deployed.img | 0 .../sample/files/to_be_deployed.bin | 0 .../sample/source/app.d | 0 .../source/app.d | 0 .../issue2258-dynLib-exe-dep/dub.json | 0 .../issue2258-dynLib-exe-dep/source/app.d | 0 .../issue2258-dynLib-exe-dep/test.config | 0 .../.gitignore | 0 .../dub.json | 0 .../sample/dub.sdl | 0 .../sample/source/app.d | 0 .../source/app.d | 0 .../issue2348-postbuildcommands/.gitignore | 0 .../issue2348-postbuildcommands/dub.json | 0 .../issue2348-postbuildcommands/single.d | 0 .../issue2348-postbuildcommands/source/app.d | 0 .../.gitignore | 0 .../issue2377-dynLib-dep-extra-files/dub.json | 0 .../sample/dep1/dub.sdl | 0 .../sample/dep1/source/dep1.d | 0 .../sample/dep2/dub.sdl | 0 .../sample/dep2/source/dep2.d | 0 .../sample/framework/dub.sdl | 0 .../sample/parent/dub.sdl | 0 .../sample/parent/source/app.d | 0 .../sample/parent/source/parent.d | 0 .../source/app.d | 0 test/{new_tests => }/issue2448/.gitignore | 0 test/{new_tests => }/issue2448/dub.json | 0 test/{new_tests => }/issue2448/ext/kekw.d | 0 test/{new_tests => }/issue2448/source/app.d | 0 test/{new_tests => }/issue2452/dub.json | 0 test/{new_tests => }/issue2452/source/app.d | 0 .../issue2574-mistyping-commands/dub.json | 0 .../issue2574-mistyping-commands/source/app.d | 0 .../.gitignore | 0 .../dub.json | 0 .../sample/a/dub.json | 0 .../sample/a/source/app.d | 0 .../sample/b/dub.json | 0 .../sample/b/source/b.d | 0 .../sample/c/dub.json | 0 .../sample/c/source/c.d | 0 .../source/app.d | 0 .../issue2650-deprecated-modules/dub.sdl | 0 .../source/test.d | 0 .../issue2650-deprecated-modules/test.config | 0 .../issue2684-recipe-file/.gitignore | 0 .../issue2684-recipe-file/dub.json | 0 .../sample/anotherSource/app.d | 0 .../issue2684-recipe-file/sample/dub.json | 0 .../sample/dubWithAnotherSource.json | 0 .../issue2684-recipe-file/sample/source/app.d | 0 .../issue2684-recipe-file/source/app.d | 0 .../.gitignore | 0 .../c_headers/foo.h | 0 .../dub.sdl | 0 .../source/app.d | 0 .../source/foo.c | 0 .../test.config | 0 .../issue2840-build-collision/.gitignore | 0 .../issue2840-build-collision/dub.json | 0 .../issue2840-build-collision/sample/build.d | 0 .../issue2840-build-collision/source/app.d | 0 .../issue346-redundant-flags/.gitignore | 0 .../issue346-redundant-flags/dub.json | 0 .../sample/a/dub.json | 0 .../sample/a/source/a.d | 0 .../sample/b/dub.json | 0 .../sample/b/source/b.d | 0 .../sample/main/dub.json | 0 .../sample/main/source/main.d | 0 .../issue346-redundant-flags/source/app.d | 0 .../issue361-optional-deps/.gitignore | 0 .../issue361-optional-deps/dub.json | 0 .../issue361-optional-deps/sample/a/dub.sdl | 0 .../issue361-optional-deps/sample/a/src/a.d | 0 .../issue361-optional-deps/sample/b/dub.sdl | 0 .../issue361-optional-deps/sample/b/src/b.d | 0 .../sample/main1/dub.sdl | 0 .../sample/main1/src/main1.d | 0 .../sample/main2/dub.sdl | 0 .../sample/main2/dub.selections.json | 0 .../sample/main2/src/main2.d | 0 .../issue361-optional-deps/source/app.d | 0 .../issue502-root-import/dub.json | 0 .../issue502-root-import/source/app.d | 0 .../.gitignore | 0 .../dub.json | 0 .../sample/a-1.0.0/dub.json | 0 .../sample/a-1.0.0/source/a.d | 0 .../sample/a-1.1.0/dub.json | 0 .../sample/a-1.1.0/source/a.d | 0 .../sample/main/dub.json | 0 .../sample/main/dub.selections.json | 0 .../sample/main/source/app.d | 0 .../source/app.d | 0 .../issue586-subpack-dep/.gitignore | 0 .../issue586-subpack-dep/dub.json | 0 .../issue586-subpack-dep/sample/a/b/dub.sdl | 0 .../sample/a/b/source/b.d | 0 .../issue586-subpack-dep/sample/a/dub.sdl | 0 .../issue586-subpack-dep/sample/a/source/a.d | 0 .../issue586-subpack-dep/sample/main/dub.sdl | 0 .../sample/main/dub.selections.json | 0 .../sample/main/source/c.d | 0 .../issue586-subpack-dep/source/app.d | 0 .../issue613-dynlib-pic/dub.sdl | 0 .../issue613-dynlib-pic/source/app.d | 0 .../issue613-dynlib-pic/test.config | 0 .../.gitignore | 0 .../dub.json | 0 .../do-preGenerateCommands.sh | 0 .../dub.json | 0 .../src/dummy.d | 0 .../sample/issue616-subpack/dub.json | 0 .../sample/issue616-subpack/src/dummy.d | 0 .../sample/issue616-subsubpack/dub.json | 0 .../sample/issue616-subsubpack/src/dummy.d | 0 .../source/app.d | 0 .../issue672-upgrade-optional/.gitignore | 0 .../issue672-upgrade-optional/dub.json | 0 .../issue672-upgrade-optional/sample/dub.sdl | 0 .../issue672-upgrade-optional/source/app.d | 0 .../issue674-concurrent-dub/dub.json | 0 .../issue674-concurrent-dub/source/app.d | 0 .../issue686-multiple-march/.gitignore | 0 .../issue686-multiple-march/dub.json | 0 .../issue686-multiple-march/sample/a/dub.json | 0 .../sample/a/source/a.d | 0 .../issue686-multiple-march/sample/b/dub.json | 0 .../sample/b/source/b.d | 0 .../sample/main/dub.json | 0 .../sample/main/source/main.d | 0 .../issue686-multiple-march/source/app.d | 0 .../issue754-path-selection-fail/.gitignore | 0 .../a-1.0/dub.sdl | 0 .../a-1.0/source/a.d | 0 .../a-2.0/dub.sdl | 0 .../issue754-path-selection-fail/dub.sdl | 0 .../dub.selections.json | 0 .../issue754-path-selection-fail/source/app.d | 0 .../issue777-bogus-path-dependency/.gitignore | 0 .../issue777-bogus-path-dependency/b/a.d | 0 .../issue777-bogus-path-dependency/b/dub.sdl | 0 .../c-err/dub.sdl | 0 .../c-err/source/lib.d | 0 .../issue777-bogus-path-dependency/c/dub.sdl | 0 .../c/source/lib.d | 0 .../issue777-bogus-path-dependency/dub.sdl | 0 .../dub.selections.json | 0 .../source/app.d | 0 .../issue782-gtkd-pkg-config/.gitignore | 0 .../issue782-gtkd-pkg-config/dub.json | 0 .../sample/fake-gtkd/dub.json | 0 .../sample/fake-gtkd/pkgconfig/fake-gtkd.pc | 0 .../sample/fake-gtkd/src/fakegtkd.d | 0 .../sample/fake-gtkd/src/lib.d | 0 .../sample/main/dub.json | 0 .../sample/main/src/app.d | 0 .../issue782-gtkd-pkg-config/source/app.d | 0 .../issue782-gtkd-pkg-config/test.config | 0 .../issue813-fixed-dependency/.gitignore | 0 .../issue813-fixed-dependency/dub.json | 0 .../sample/main/dub.sdl | 0 .../sample/main/dub.selections.json | 0 .../sample/main/src/app.d | 0 .../sample/sub/dub.sdl | 0 .../sample/sub/sub/dub.sdl | 0 .../sample/sub/sub/src/sub/test.d | 0 .../issue813-fixed-dependency/source/app.d | 0 .../issue813-pure-sub-dependency/.gitignore | 0 .../issue813-pure-sub-dependency/dub.json | 0 .../sample/main/dub.sdl | 0 .../sample/main/src/app.d | 0 .../sample/sub/dub.sdl | 0 .../sample/sub/sub/dub.sdl | 0 .../sample/sub/sub/src/sub/test.d | 0 .../issue813-pure-sub-dependency/source/app.d | 0 .../.gitignore | 0 .../dub.json | 0 .../sample/dub.json | 0 .../source/app.d | 0 .../issue838-custom-cache-paths/.gitignore | 0 .../issue838-custom-cache-paths/dub.json | 0 .../sample/cache/foo/1.0.0/foo/dub.sdl | 0 .../sample/dub.sdl | 0 .../sample/source/app.d | 0 .../issue838-custom-cache-paths/source/app.d | 0 .../dub.json | 0 .../source/app.d | 0 .../dub.json | 0 .../source/app.d | 0 .../issue895-local-configuration/.gitignore | 0 .../issue895-local-configuration/dub.json | 0 .../sample/dub.json | 0 .../sample/source/app.d | 0 .../issue895-local-configuration/source/app.d | 0 .../issue895-local-configuration/test.config | 0 .../issue923-subpackage-deps/.gitignore | 0 .../issue923-subpackage-deps/dub.json | 0 .../issue923-subpackage-deps/sample/a/dub.sdl | 0 .../issue923-subpackage-deps/sample/b/dub.sdl | 0 .../sample/b/source/b.d | 0 .../sample/main/dub.sdl | 0 .../sample/main/source/app.d | 0 .../issue923-subpackage-deps/source/app.d | 0 .../issue934-path-dep/.gitignore | 0 .../issue934-path-dep/dub.json | 0 .../issue934-path-dep/sample/a/dub.sdl | 0 .../issue934-path-dep/sample/b/dub.sdl | 0 .../issue934-path-dep/sample/b/source/b.d | 0 .../issue934-path-dep/sample/main/dub.sdl | 0 .../sample/main/source/app.d | 0 .../issue934-path-dep/source/app.d | 0 .../.gitignore | 0 .../issue959-path-based-subpack-dep/dub.sdl | 0 .../foo/dub.sdl | 0 .../issue959-path-based-subpack-dep/main.d | 0 .../issue97-targettype-none-nodeps/.gitignore | 0 .../issue97-targettype-none-nodeps/a/dub.sdl | 0 .../a/source/app.d | 0 .../issue97-targettype-none-nodeps/b/dub.sdl | 0 .../b/source/app.d | 0 .../issue97-targettype-none-nodeps/dub.sdl | 0 .../test.config | 0 .../.gitignore | 0 .../a/source/app.d | 0 .../b/source/app.d | 0 .../issue97-targettype-none-onerecipe/dub.sdl | 0 .../test.config | 0 .../issue97-targettype-none/.gitignore | 0 .../issue97-targettype-none/dub.json | 0 .../issue97-targettype-none/sample/a/dub.sdl | 0 .../sample/a/source/app.d | 0 .../issue97-targettype-none/sample/b/dub.sdl | 0 .../sample/b/source/app.d | 0 .../issue97-targettype-none/sample/dub.sdl | 0 .../issue97-targettype-none/source/app.d | 0 .../.gitignore | 0 .../dub.json | 0 .../sample/dub.sdl | 0 .../sample/dub.selections.json | 0 .../sample/source/app.d | 0 .../source/app.d | 0 test/{new_tests => }/mutex-main-1/dub.json | 0 .../{new_tests => }/mutex-main-1/source/app.d | 0 .../mutex-main-1/source/app2.d | 0 test/{new_tests => }/mutex-main-1/test.config | 0 test/{new_tests => }/mutex-main-2/dub.json | 0 .../{new_tests => }/mutex-main-2/source/app.d | 0 .../mutex-main-2/source/app2.d | 0 test/{new_tests => }/mutex-main-2/test.config | 0 test/{new_tests => }/mutex-main-3/dub.json | 0 .../{new_tests => }/mutex-main-3/source/app.d | 0 .../mutex-main-3/source/app2.d | 0 test/{new_tests => }/mutex-main-3/test.config | 0 test/new_tests/.gitignore | 11 --- .../path-subpackage-ref/.gitignore | 0 .../path-subpackage-ref/dub.json | 0 .../path-subpackage-ref/source/app.d | 0 .../path-subpackage-ref/subpack/dub.json | 0 .../path-subpackage-ref/subpack/source/lib.d | 0 .../pr1549-dub-exe-var/.gitignore | 0 .../pr1549-dub-exe-var/dub.json | 0 .../pr1549-dub-exe-var/sample/dub.sdl | 0 .../pr1549-dub-exe-var/sample/setmsg.d | 0 .../pr1549-dub-exe-var/sample/source/app.d | 0 .../pr1549-dub-exe-var/source/app.d | 0 test/{new_tests => }/pr2642-cache-db/dub.sdl | 0 .../pr2642-cache-db/source/test_cache_db.d | 0 .../pr2644-describe-artifact-path/dub.sdl | 0 .../source/describe_artifact_path.d | 0 .../pr2647-build-deep/.gitignore | 0 .../{new_tests => }/pr2647-build-deep/dub.sdl | 0 .../pr2647-build-deep/sample/dub.sdl | 0 .../pr2647-build-deep/sample/source/lib.d | 0 .../source/test_build_deep.d | 0 .../removed-dub-obj/.gitignore | 0 test/{new_tests => }/removed-dub-obj/dub.json | 0 .../removed-dub-obj/sample/dub.sdl | 0 .../removed-dub-obj/sample/source/test.d | 0 .../removed-dub-obj/source/app.d | 0 test/run_unittest/source/app.d | 2 +- .../source/run_unittest/runner/config.d | 2 +- .../source/run_unittest/runner/runner.d | 2 +- .../sdl-package-simple/dub.sdl | 0 .../sdl-package-simple/source/app.d | 0 .../single-file-sdl-default-name/.gitignore | 0 .../single-file-sdl-default-name/dub.json | 0 .../single-file-sdl-default-name-sample.d | 0 .../single-file-sdl-default-name/source/app.d | 0 .../.gitignore | 0 .../dub.json | 0 .../sample/code/mypackage/client/app.d | 0 .../sample/code/mypackage/client/extra.d | 0 .../sample/code/mypackage/common/blah.d | 0 .../sample/code/mypackage/server/app.d | 0 .../sample/code/mypackage/server/extra.d | 0 .../sample/dub.sdl | 0 .../source/app.d | 0 test/{new_tests => }/subpackage-ref/dub.json | 0 .../subpackage-ref/source/app.d | 0 .../test-upgrade-subpackages/.gitignore | 0 .../test-upgrade-subpackages/dub.json | 0 .../test-upgrade-subpackages/sample/dub.json | 0 .../sample/source/app.d | 0 .../sample/subpack/dub.json | 0 .../sample/subpack/source/lib.d | 0 .../test-upgrade-subpackages/source/app.d | 0 .../{new_tests => }/test-version-opt/dub.json | 0 .../test-version-opt/source/app.d | 0 test/{new_tests => }/timeout/dub.json | 0 test/{new_tests => }/timeout/source/app.d | 0 .../{new_tests => }/unittest-cov-ctfe/dub.sdl | 0 .../unittest-cov-ctfe/source/mod.d | 0 .../unittest-cov-ctfe/test.config | 0 test/{new_tests => }/use-c-sources/dub.json | 0 .../use-c-sources/source/app.d | 0 .../use-c-sources/source/some_c_code.c | 0 .../use-c-sources/source/some_c_code.h | 0 .../{new_tests => }/use-c-sources/test.config | 0 .../version-filters-diamond/.gitignore | 0 .../version-filters-diamond/daughter/dub.sdl | 0 .../daughter/source/dummy.d | 0 .../diamond/.gitignore | 0 .../version-filters-diamond/diamond/dub.sdl | 0 .../diamond/source/dummy.d | 0 .../version-filters-diamond/dub.sdl | 0 .../version-filters-diamond/son/dub.sdl | 0 .../son/source/dummy.d | 0 .../version-filters-diamond/source/app.d | 0 .../version-filters-diamond/test.config | 0 .../version-filters-none/dub.sdl | 0 .../version-filters-none/source/app.d | 0 .../version-filters-none/test.config | 0 .../version-filters-source-dep/.gitignore | 0 .../version-filters-source-dep/dub.sdl | 0 .../source-dep/dub.sdl | 0 .../source-dep/source/dummy.d | 0 .../version-filters-source-dep/source/app.d | 0 .../version-filters-source-dep/test.config | 0 .../version-filters/.gitignore | 0 .../version-filters/daughter/dub.sdl | 0 .../version-filters/daughter/source/dummy.d | 0 test/{new_tests => }/version-filters/dub.sdl | 0 .../version-filters/son/dub.sdl | 0 .../version-filters/son/source/dummy.d | 0 .../version-filters/source/app.d | 0 .../version-filters/test.config | 0 test/{new_tests => }/version-spec/.gitignore | 0 test/{new_tests => }/version-spec/dub.json | 0 .../version-spec/sample/newfoo/dub.sdl | 0 .../version-spec/sample/newfoo/source/app.d | 0 .../version-spec/sample/oldfoo/dub.sdl | 0 .../version-spec/sample/oldfoo/source/app.d | 0 .../{new_tests => }/version-spec/source/app.d | 0 test/{new_tests => }/win32_default/.gitignore | 0 test/{new_tests => }/win32_default/dub.json | 0 test/{new_tests => }/win32_default/sample.d | 0 .../win32_default/source/app.d | 0 .../{new_tests => }/win32_default/test.config | 0 928 files changed, 17 insertions(+), 85 deletions(-) rename test/{new_tests => }/0-init-fail-json/dub.sdl (100%) rename test/{new_tests => }/0-init-fail-json/source/app.d (100%) rename test/{new_tests => }/0-init-fail/dub.sdl (100%) rename test/{new_tests => }/0-init-fail/source/app.d (100%) rename test/{new_tests => }/0-init-interactive/.gitignore (100%) rename test/{new_tests => }/0-init-interactive/dub.sdl (100%) rename test/{new_tests => }/0-init-interactive/exp/default_name.dub.sdl (100%) rename test/{new_tests => }/0-init-interactive/exp/dub.json (100%) rename test/{new_tests => }/0-init-interactive/exp/dub.sdl (100%) rename test/{new_tests => }/0-init-interactive/exp/license_gpl3.dub.sdl (100%) rename test/{new_tests => }/0-init-interactive/exp/license_mpl2.dub.sdl (100%) rename test/{new_tests => }/0-init-interactive/exp/license_proprietary.dub.sdl (100%) rename test/{new_tests => }/0-init-interactive/source/app.d (100%) rename test/{new_tests => }/0-init-multi-json/dub.sdl (100%) rename test/{new_tests => }/0-init-multi-json/source/app.d (100%) rename test/{new_tests => }/0-init-multi/dub.sdl (100%) rename test/{new_tests => }/0-init-multi/source/app.d (100%) rename test/{new_tests => }/0-init-simple-json/dub.sdl (100%) rename test/{new_tests => }/0-init-simple-json/source/app.d (100%) rename test/{new_tests => }/0-init-simple/dub.sdl (100%) rename test/{new_tests => }/0-init-simple/source/app.d (100%) rename test/{new_tests => }/1-dynLib-simple/dub.json (100%) rename test/{new_tests => }/1-dynLib-simple/source/dynlib/app.d (100%) rename test/{new_tests => }/1-dynLib-simple/test.config (100%) rename test/{new_tests => }/1-exec-simple-package-json/package.json (100%) rename test/{new_tests => }/1-exec-simple-package-json/source/app.d (100%) rename test/{new_tests => }/1-exec-simple/dub.json (100%) rename test/{new_tests => }/1-exec-simple/source/app.d (100%) rename test/{new_tests => }/1-staticLib-simple/dub.json (100%) rename test/{new_tests => }/1-staticLib-simple/source/staticlib/app.d (100%) rename test/{new_tests => }/1-staticLib-simple/test.config (100%) rename test/{new_tests => }/2-dynLib-dep/dub.json (100%) rename test/{new_tests => }/2-dynLib-dep/source/app.d (100%) rename test/{new_tests => }/2-dynLib-dep/test.config (100%) rename test/{new_tests => }/2-dynLib-with-staticLib-dep/dub.json (100%) rename test/{new_tests => }/2-dynLib-with-staticLib-dep/source/dynlib/app.d (100%) rename test/{new_tests => }/2-dynLib-with-staticLib-dep/test.config (100%) rename test/{new_tests => }/2-sourceLib-dep/dub.json (100%) rename test/{new_tests => }/2-sourceLib-dep/source/app.d (100%) rename test/{new_tests => }/2-staticLib-dep/dub.json (100%) rename test/{new_tests => }/2-staticLib-dep/source/app.d (100%) rename test/{new_tests => }/2-staticLib-dep/test.config (100%) rename test/{new_tests => }/3-copyFiles/.gitignore (100%) rename test/{new_tests => }/3-copyFiles/data/file_to_copy.txt (100%) rename test/{new_tests => }/3-copyFiles/data/file_to_copy_mask1.txt (100%) rename test/{new_tests => }/3-copyFiles/data/file_to_copy_mask2.txt (100%) rename test/{new_tests => }/3-copyFiles/data/res/.nocopy/file_inside_dot_prefixed_dir.txt (100%) rename test/{new_tests => }/3-copyFiles/data/res/hdpi/file1.txt (100%) rename test/{new_tests => }/3-copyFiles/data/res/hdpi/file2.txt (100%) rename test/{new_tests => }/3-copyFiles/data/res/hdpi/file3.txt (100%) rename test/{new_tests => }/3-copyFiles/data/res/hdpi/nested_dir/nested_file.txt (100%) rename test/{new_tests => }/3-copyFiles/data/res/i18n/resource_en.txt (100%) rename test/{new_tests => }/3-copyFiles/data/res/i18n/resource_fr.txt (100%) rename test/{new_tests => }/3-copyFiles/data/res/ldpi/file1.txt (100%) rename test/{new_tests => }/3-copyFiles/data/res/ldpi/file2.txt (100%) rename test/{new_tests => }/3-copyFiles/data/res/ldpi/file3.txt (100%) rename test/{new_tests => }/3-copyFiles/data/res/mdpi/file1.txt (100%) rename test/{new_tests => }/3-copyFiles/data/res/mdpi/file2.txt (100%) rename test/{new_tests => }/3-copyFiles/data/res/mdpi/file3.txt (100%) rename test/{new_tests => }/3-copyFiles/dub.json (100%) rename test/{new_tests => }/3-copyFiles/source/app.d (100%) rename test/{new_tests => }/4-describe-data-1-list/dub.json (100%) rename test/{new_tests => }/4-describe-data-1-list/source/app.d (100%) rename test/{new_tests => }/4-describe-data-1-list/test.config (100%) rename test/{new_tests => }/4-describe-data-2-dmd/dub.json (100%) rename test/{new_tests => }/4-describe-data-2-dmd/source/app.d (100%) rename test/{new_tests => }/4-describe-data-2-dmd/test.config (100%) rename test/{new_tests => }/4-describe-data-3-zero-delim/dub.json (100%) rename test/{new_tests => }/4-describe-data-3-zero-delim/source/app.d (100%) rename test/{new_tests => }/4-describe-data-3-zero-delim/test.config (100%) rename test/{new_tests => }/4-describe-import-paths/dub.json (100%) rename test/{new_tests => }/4-describe-import-paths/source/app.d (100%) rename test/{new_tests => }/4-describe-import-paths/test.config (100%) rename test/{new_tests => }/4-describe-json/dub.json (100%) rename test/{new_tests => }/4-describe-json/source/app.d (100%) rename test/{new_tests => }/4-describe-json/test.config (100%) rename test/{new_tests => }/4-describe-string-import-paths/dub.json (100%) rename test/{new_tests => }/4-describe-string-import-paths/source/app.d (100%) rename test/{new_tests => }/4-describe-string-import-paths/test.config (100%) rename test/{new_tests => }/5-convert-stdout/.gitignore (100%) rename test/{new_tests => }/5-convert-stdout/dub.json (100%) rename test/{new_tests => }/5-convert-stdout/sample/dub.json (100%) rename test/{new_tests => }/5-convert-stdout/source/app.d (100%) rename test/{new_tests => }/5-convert/.gitignore (100%) rename test/{new_tests => }/5-convert/dub.json (100%) rename test/{new_tests => }/5-convert/sample/dub.sdl (100%) rename test/{new_tests => }/5-convert/source/app.d (100%) rename test/{new_tests => }/README.md (100%) rename test/{new_tests => }/cache-generated-test-config/.gitignore (100%) rename test/{new_tests => }/cache-generated-test-config/dub.json (100%) rename test/{new_tests => }/cache-generated-test-config/sample/dub.sdl (100%) rename test/{new_tests => }/cache-generated-test-config/sample/source/test.d (100%) rename test/{new_tests => }/cache-generated-test-config/source/app.d (100%) rename test/{new_tests => }/colored-output/.gitignore (100%) rename test/{new_tests => }/colored-output/dub.json (100%) rename test/{new_tests => }/colored-output/sample/dub.sdl (100%) rename test/{new_tests => }/colored-output/sample/source/lib.d (100%) rename test/{new_tests => }/colored-output/source/app.d (100%) rename test/{new_tests => }/colored-output/test.config (100%) rename test/{new_tests => }/common/dub.json (100%) rename test/{new_tests => }/common/source/common.d (100%) rename test/{new_tests => }/cov-ctfe/.gitignore (100%) rename test/{new_tests => }/cov-ctfe/dub.sdl (100%) rename test/{new_tests => }/cov-ctfe/test.config (100%) rename test/{new_tests => }/cov-ctfe/test.d (100%) rename test/{new_tests => }/custom-source-main-bug487/.gitignore (100%) rename test/{new_tests => }/custom-source-main-bug487/dub.json (100%) rename test/{new_tests => }/custom-source-main-bug487/mysrc/app.d (100%) rename test/{new_tests => }/custom-source-main-bug487/test.config (100%) rename test/{new_tests => }/custom-unittest/.gitignore (100%) rename test/{new_tests => }/custom-unittest/dub.json (100%) rename test/{new_tests => }/custom-unittest/source/app.d (100%) rename test/{new_tests => }/custom-unittest/source/lib.d (100%) rename test/{new_tests => }/custom-unittest/test.config (100%) rename test/{new_tests => }/custom-unittest/test/main.d (100%) rename test/{new_tests => }/d-versions/.gitignore (100%) rename test/{new_tests => }/d-versions/dub.json (100%) rename test/{new_tests => }/d-versions/sample/dub.sdl (100%) rename test/{new_tests => }/d-versions/sample/source/app.d (100%) rename test/{new_tests => }/d-versions/source/app.d (100%) rename test/{new_tests => }/ddox/.gitignore (100%) rename test/{new_tests => }/ddox/custom-tool/dub.sdl (100%) rename test/{new_tests => }/ddox/custom-tool/public/copied (100%) rename test/{new_tests => }/ddox/custom-tool/source/app.d (100%) rename test/{new_tests => }/ddox/custom/dub.sdl (100%) rename test/{new_tests => }/ddox/custom/source/ddox_project.d (100%) rename test/{new_tests => }/ddox/default/dub.sdl (100%) rename test/{new_tests => }/ddox/default/source/ddox_project.d (100%) rename test/{new_tests => }/ddox/dub.json (100%) rename test/{new_tests => }/ddox/source/app.d (100%) rename test/{new_tests => }/depen-build-settings/.gitignore (100%) rename test/{new_tests => }/depen-build-settings/depend/depend2/dub.json (100%) rename test/{new_tests => }/depen-build-settings/depend/depend2/source/depend2.d (100%) rename test/{new_tests => }/depen-build-settings/depend/dub.json (100%) rename test/{new_tests => }/depen-build-settings/depend/source/depend.d (100%) rename test/{new_tests => }/depen-build-settings/dub.json (100%) rename test/{new_tests => }/depen-build-settings/dub.selections.json (100%) rename test/{new_tests => }/depen-build-settings/source/app.d (100%) rename test/{new_tests => }/depen-build-settings/test.config (100%) rename test/{new_tests => }/dest-directory/.gitignore (100%) rename test/{new_tests => }/dest-directory/dub.json (100%) rename test/{new_tests => }/dest-directory/sample/dub.sdl (100%) rename test/{new_tests => }/dest-directory/sample/source/app.d (100%) rename test/{new_tests => }/dest-directory/source/app.d (100%) rename test/{new_tests => }/dpath-variable/.gitignore (100%) rename test/{new_tests => }/dpath-variable/dub.json (100%) rename test/{new_tests => }/dpath-variable/sample/dub.json (100%) rename test/{new_tests => }/dpath-variable/sample/source/app.d (100%) rename test/{new_tests => }/dpath-variable/source/app.d (100%) rename test/{new_tests => }/dub-as-a-library-cwd/.gitignore (100%) rename test/{new_tests => }/dub-as-a-library-cwd/dub.json (100%) rename test/{new_tests => }/dub-as-a-library-cwd/sample/dub.json (79%) rename test/{new_tests => }/dub-as-a-library-cwd/sample/source/app.d (100%) rename test/{new_tests => }/dub-as-a-library-cwd/sample/subproject/dub.sdl (100%) rename test/{new_tests => }/dub-as-a-library-cwd/sample/subproject/source/app.d (100%) rename test/{new_tests => }/dub-as-a-library-cwd/source/app.d (100%) rename test/{new_tests => }/dub-custom-root/.gitignore (100%) rename test/{new_tests => }/dub-custom-root/custom-root-2/dub.json (100%) rename test/{new_tests => }/dub-custom-root/custom-root-2/source/app.d (64%) rename test/{new_tests => }/dub-custom-root/custom-root/dub.json (100%) rename test/{new_tests => }/dub-custom-root/custom-root/source/app.d (86%) rename test/{new_tests => }/dub-custom-root/dub.json (100%) rename test/{new_tests => }/dub-custom-root/source/app.d (100%) rename test/{new_tests => }/dub_test_root/dub.json (100%) rename test/{new_tests => }/dub_test_root/source/app.d (100%) rename test/{new_tests => }/dustmite-no-redirect/.gitignore (100%) rename test/{new_tests => }/dustmite-no-redirect/dub.json (100%) rename test/{new_tests => }/dustmite-no-redirect/sample/dub.json (100%) rename test/{new_tests => }/dustmite-no-redirect/sample/source/app.d (100%) rename test/{new_tests => }/dustmite-no-redirect/source/app.d (100%) rename test/{new_tests => }/environment-variables/.gitignore (100%) rename test/{new_tests => }/environment-variables/dub.json (100%) rename test/{new_tests => }/environment-variables/sample/deppkg/dub.json (100%) rename test/{new_tests => }/environment-variables/sample/deppkg/source/deppkg/foo.d (100%) rename test/{new_tests => }/environment-variables/sample/dub.json (100%) rename test/{new_tests => }/environment-variables/sample/dub.settings.json (100%) rename test/{new_tests => }/environment-variables/sample/source/app.d (100%) rename test/{new_tests => }/environment-variables/source/app.d (100%) rename test/{new_tests => }/extra/.gitignore (100%) rename test/{new_tests => }/extra/1-sourceLib-simple/dub.json (100%) rename test/{new_tests => }/extra/1-sourceLib-simple/source/sourcelib/app.d (100%) rename test/{new_tests => }/extra/4-describe/.gitignore (100%) rename test/{new_tests => }/extra/4-describe/dependency-1/data/dummy-dep1.dat (100%) rename test/{new_tests => }/extra/4-describe/dependency-1/dependency-postGenerateCommands.sh (100%) rename test/{new_tests => }/extra/4-describe/dependency-1/dependency-preGenerateCommands.sh (100%) rename test/{new_tests => }/extra/4-describe/dependency-1/dub.json (100%) rename test/{new_tests => }/extra/4-describe/dependency-1/otherdir/dummy.d (100%) rename test/{new_tests => }/extra/4-describe/dependency-1/source/dummy.d (100%) rename test/{new_tests => }/extra/4-describe/dependency-2/dub.json (100%) rename test/{new_tests => }/extra/4-describe/dependency-2/some-extra-string-import-path/dummy.d (100%) rename test/{new_tests => }/extra/4-describe/dependency-2/some-path/dummy.d (100%) rename test/{new_tests => }/extra/4-describe/dependency-3/dep3-source/dummy.d (100%) rename test/{new_tests => }/extra/4-describe/dependency-3/dep3-string-import-path/dummy.d (100%) rename test/{new_tests => }/extra/4-describe/dependency-3/dub.json (100%) rename test/{new_tests => }/extra/4-describe/project/data/dummy.dat (100%) rename test/{new_tests => }/extra/4-describe/project/do-postGenerateCommands.sh (100%) rename test/{new_tests => }/extra/4-describe/project/do-preGenerateCommands.sh (100%) rename test/{new_tests => }/extra/4-describe/project/dub.json (100%) rename test/{new_tests => }/extra/4-describe/project/src/dummy.d (100%) rename test/{new_tests => }/extra/4-describe/project/views/dummy.d (100%) rename test/{new_tests => }/extra/4-describe/test-utils/dub.json (100%) rename test/{new_tests => }/extra/4-describe/test-utils/source/describe_test_utils.d (100%) rename test/{new_tests => }/extra/issue1336-registry/.gitignore (100%) rename test/{new_tests => }/extra/issue1336-registry/api/packages/infos__packages=%5B%22gitcompatibledubpackage%22%5D&include_dependencies=true&minimize=true (100%) rename test/{new_tests => }/extra/issue1336-registry/packages/gitcompatibledubpackage/1.0.2.zip (100%) rename test/{new_tests => }/extra/issue1336-registry/packages/gitcompatibledubpackage/1.0.3.zip (100%) rename test/{new_tests => }/extra/issue1336-registry/packages/gitcompatibledubpackage/1.0.4.zip (100%) rename test/{new_tests => }/extra/issue1416-maven-repo-pkg-supplier/.gitignore (100%) rename test/{new_tests => }/extra/issue1416-maven-repo-pkg-supplier/maven/release/dubpackages/maven-dubpackage/1.0.5/maven-dubpackage-1.0.5.zip (100%) rename test/{new_tests => }/extra/issue1416-maven-repo-pkg-supplier/maven/release/dubpackages/maven-dubpackage/1.0.6/maven-dubpackage-1.0.6.zip (100%) rename test/{new_tests => }/extra/issue1416-maven-repo-pkg-supplier/maven/release/dubpackages/maven-dubpackage/maven-metadata.xml (100%) rename test/{new_tests => }/extra/test_registry/.gitignore (100%) rename test/{new_tests => }/extra/test_registry/dub.json (100%) rename test/{new_tests => }/extra/test_registry/source/test_registry_helper.d (100%) rename test/{new_tests => }/extra/test_registry/test_registry.d (100%) rename test/{new_tests => }/feat663-search/dub.json (100%) rename test/{new_tests => }/feat663-search/source/app.d (100%) rename test/{new_tests => }/fetchzip/dub.json (100%) rename test/{new_tests => }/fetchzip/source/app.d (100%) rename test/{new_tests => }/fetchzip/test.config (100%) rename test/{new_tests => }/filesystem-version-with-buildinfo/.gitignore (100%) rename test/{new_tests => }/filesystem-version-with-buildinfo/dub.json (100%) rename test/{new_tests => }/filesystem-version-with-buildinfo/file-registry/fs-json-dubpackage-1.0.7+build-9-9-9.zip (100%) rename test/{new_tests => }/filesystem-version-with-buildinfo/source/app.d (100%) rename test/{new_tests => }/frameworks/dub.sdl (100%) rename test/{new_tests => }/frameworks/source/app.d (100%) rename test/{new_tests => }/frameworks/test.config (100%) rename test/{new_tests => }/git-dependency/.gitignore (100%) rename test/{new_tests => }/git-dependency/dub.json (100%) rename test/{new_tests => }/git-dependency/src/app.d (100%) rename test/{new_tests => }/help/dub.json (100%) rename test/{new_tests => }/help/source/app.d (100%) rename test/{new_tests => }/ignore-hidden-1/.gitignore (100%) rename test/{new_tests => }/ignore-hidden-1/dub.json (100%) rename test/{new_tests => }/ignore-hidden-1/source/.hidden.d (100%) rename test/{new_tests => }/ignore-hidden-1/source/app.d (100%) rename test/{new_tests => }/ignore-hidden-1/test.config (100%) rename test/{new_tests => }/ignore-hidden-2/.gitignore (100%) rename test/{new_tests => }/ignore-hidden-2/dub.json (100%) rename test/{new_tests => }/ignore-hidden-2/source/.hidden.d (100%) rename test/{new_tests => }/ignore-hidden-2/source/app.d (100%) rename test/{new_tests => }/ignore-hidden-2/test.config (100%) rename test/{new_tests => }/ignore-useless-arch-switch/dub.sdl (100%) rename test/{new_tests => }/ignore-useless-arch-switch/source/app.d (100%) rename test/{new_tests => }/injected-from-dependency/.gitignore (100%) rename test/{new_tests => }/injected-from-dependency/ahook.d (100%) rename test/{new_tests => }/injected-from-dependency/dub.json (100%) rename test/{new_tests => }/injected-from-dependency/source/entry.d (100%) rename test/{new_tests => }/injected-from-dependency/toload/vars.d (100%) rename test/{new_tests => }/interactive-remove/dub.json (100%) rename test/{new_tests => }/interactive-remove/source/app.d (100%) rename test/{new_tests => }/issue1003-check-empty-ld-flags/dub.json (100%) rename test/{new_tests => }/issue1003-check-empty-ld-flags/source/app.d (100%) rename test/{new_tests => }/issue1003-check-empty-ld-flags/test.config (100%) rename test/{new_tests => }/issue1004-override-config/.gitignore (100%) rename test/{new_tests => }/issue1004-override-config/dub.json (100%) rename test/{new_tests => }/issue1004-override-config/sample/a/a.d (100%) rename test/{new_tests => }/issue1004-override-config/sample/a/dub.sdl (100%) rename test/{new_tests => }/issue1004-override-config/sample/main/dub.sdl (100%) rename test/{new_tests => }/issue1004-override-config/sample/main/source/main.d (100%) rename test/{new_tests => }/issue1004-override-config/source/app.d (100%) rename test/{new_tests => }/issue1005-configuration-resolution/.gitignore (100%) rename test/{new_tests => }/issue1005-configuration-resolution/dub.json (100%) rename test/{new_tests => }/issue1005-configuration-resolution/sample/a/dub.sdl (100%) rename test/{new_tests => }/issue1005-configuration-resolution/sample/b/dub.sdl (100%) rename test/{new_tests => }/issue1005-configuration-resolution/sample/b/source/b.d (100%) rename test/{new_tests => }/issue1005-configuration-resolution/sample/c/dub.sdl (100%) rename test/{new_tests => }/issue1005-configuration-resolution/sample/main/dub.sdl (100%) rename test/{new_tests => }/issue1005-configuration-resolution/sample/main/source/app.d (100%) rename test/{new_tests => }/issue1005-configuration-resolution/source/app.d (100%) rename test/{new_tests => }/issue1024-selective-upgrade/.gitignore (100%) rename test/{new_tests => }/issue1024-selective-upgrade/dub.json (100%) rename test/{new_tests => }/issue1024-selective-upgrade/sample/a-1.0.0/dub.sdl (100%) rename test/{new_tests => }/issue1024-selective-upgrade/sample/a-1.0.1/dub.sdl (100%) rename test/{new_tests => }/issue1024-selective-upgrade/sample/b-1.0.0/dub.sdl (100%) rename test/{new_tests => }/issue1024-selective-upgrade/sample/b-1.0.1/dub.sdl (100%) rename test/{new_tests => }/issue1024-selective-upgrade/sample/main/dub.sdl (100%) rename test/{new_tests => }/issue1024-selective-upgrade/source/app.d (100%) rename test/{new_tests => }/issue103-single-file-package/.gitignore (100%) rename test/{new_tests => }/issue103-single-file-package/dub.json (100%) rename test/{new_tests => }/issue103-single-file-package/sample/json.d (100%) rename test/{new_tests => }/issue103-single-file-package/sample/no-ext (90%) rename test/{new_tests => }/issue103-single-file-package/sample/sdl.d (90%) rename test/{new_tests => }/issue103-single-file-package/sample/w-dep.d (100%) rename test/{new_tests => }/issue103-single-file-package/source/app.d (100%) rename test/{new_tests => }/issue1037-better-dependency-messages/.gitignore (100%) rename test/{new_tests => }/issue1037-better-dependency-messages/dub.json (100%) rename test/{new_tests => }/issue1037-better-dependency-messages/sample/b/dub.json (100%) rename test/{new_tests => }/issue1037-better-dependency-messages/sample/dub.json (100%) rename test/{new_tests => }/issue1037-better-dependency-messages/source/app.d (100%) rename test/{new_tests => }/issue1040-run-with-ver/dub.json (100%) rename test/{new_tests => }/issue1040-run-with-ver/source/app.d (100%) rename test/{new_tests => }/issue1053-extra-files-visuald/.gitignore (100%) rename test/{new_tests => }/issue1053-extra-files-visuald/dub.json (100%) rename test/{new_tests => }/issue1053-extra-files-visuald/sample/dub.json (100%) rename test/{new_tests => }/issue1053-extra-files-visuald/sample/shaders/saturate.vert (100%) rename test/{new_tests => }/issue1053-extra-files-visuald/sample/shaders/warp.geom (100%) rename test/{new_tests => }/issue1053-extra-files-visuald/sample/source/app.d (100%) rename test/{new_tests => }/issue1053-extra-files-visuald/sample/text/LICENSE.txt (100%) rename test/{new_tests => }/issue1053-extra-files-visuald/sample/text/README.txt (100%) rename test/{new_tests => }/issue1053-extra-files-visuald/source/app.d (100%) rename test/{new_tests => }/issue1070-init-mistakes-dirs-as-files/.gitignore (100%) rename test/{new_tests => }/issue1070-init-mistakes-dirs-as-files/dub.json (100%) rename test/{new_tests => }/issue1070-init-mistakes-dirs-as-files/sample/source/.empty (100%) rename test/{new_tests => }/issue1070-init-mistakes-dirs-as-files/source/app.d (100%) rename test/{new_tests => }/issue1091-bogus-rebuild/.gitignore (100%) rename test/{new_tests => }/issue1091-bogus-rebuild/dub.json (100%) rename test/{new_tests => }/issue1091-bogus-rebuild/sample/dub.sdl (100%) rename test/{new_tests => }/issue1091-bogus-rebuild/sample/source/app.d (100%) rename test/{new_tests => }/issue1091-bogus-rebuild/source/app.d (100%) rename test/{new_tests => }/issue1117-extra-dependency-files/.gitignore (100%) rename test/{new_tests => }/issue1117-extra-dependency-files/dub.json (100%) rename test/{new_tests => }/issue1117-extra-dependency-files/sample/dependency.txt (100%) rename test/{new_tests => }/issue1117-extra-dependency-files/sample/dub.json (100%) rename test/{new_tests => }/issue1117-extra-dependency-files/sample/source/app.d (100%) rename test/{new_tests => }/issue1117-extra-dependency-files/source/app.d (100%) rename test/{new_tests => }/issue1136-temp-copy-files/.gitignore (100%) rename test/{new_tests => }/issue1136-temp-copy-files/dub.json (100%) rename test/{new_tests => }/issue1136-temp-copy-files/sample/app.d (100%) rename test/{new_tests => }/issue1136-temp-copy-files/sample/mylib/dub.sdl (100%) rename test/{new_tests => }/issue1136-temp-copy-files/sample/mylib/helloworld.txt (100%) rename test/{new_tests => }/issue1136-temp-copy-files/source/app.d (100%) rename test/{new_tests => }/issue1158-stdin-for-single-files/.gitignore (100%) rename test/{new_tests => }/issue1158-stdin-for-single-files/dub.json (100%) rename test/{new_tests => }/issue1158-stdin-for-single-files/source/app.d (100%) rename test/{new_tests => }/issue1158-stdin-for-single-files/stdin.d (100%) rename test/{new_tests => }/issue1180-local-cache-broken/.gitignore (100%) rename test/{new_tests => }/issue1180-local-cache-broken/dub.json (100%) rename test/{new_tests => }/issue1180-local-cache-broken/sample/dub.json (100%) rename test/{new_tests => }/issue1180-local-cache-broken/sample/source/app.d (100%) rename test/{new_tests => }/issue1180-local-cache-broken/source/app.d (100%) rename test/{new_tests => }/issue1180-local-cache-broken/test.config (100%) rename test/{new_tests => }/issue1194-warn-wrong-subconfig/.gitignore (100%) rename test/{new_tests => }/issue1194-warn-wrong-subconfig/dub.json (100%) rename test/{new_tests => }/issue1194-warn-wrong-subconfig/sample/dub.sdl (100%) rename test/{new_tests => }/issue1194-warn-wrong-subconfig/sample/source/app.d (100%) rename test/{new_tests => }/issue1194-warn-wrong-subconfig/source/app.d (100%) rename test/{new_tests => }/issue1262-version-inheritance-diamond/.gitignore (100%) rename test/{new_tests => }/issue1262-version-inheritance-diamond/daughter/dub.sdl (100%) rename test/{new_tests => }/issue1262-version-inheritance-diamond/daughter/source/dummy.d (100%) rename test/{new_tests => }/issue1262-version-inheritance-diamond/diamond/dub.sdl (100%) rename test/{new_tests => }/issue1262-version-inheritance-diamond/diamond/source/dummy.d (100%) rename test/{new_tests => }/issue1262-version-inheritance-diamond/dub.sdl (100%) rename test/{new_tests => }/issue1262-version-inheritance-diamond/son/dub.sdl (100%) rename test/{new_tests => }/issue1262-version-inheritance-diamond/son/source/dummy.d (100%) rename test/{new_tests => }/issue1262-version-inheritance-diamond/source/app.d (100%) rename test/{new_tests => }/issue1262-version-inheritance-diamond/test.config (100%) rename test/{new_tests => }/issue1262-version-inheritance/.gitignore (100%) rename test/{new_tests => }/issue1262-version-inheritance/daughter/dub.sdl (100%) rename test/{new_tests => }/issue1262-version-inheritance/daughter/source/dummy.d (100%) rename test/{new_tests => }/issue1262-version-inheritance/dub.sdl (100%) rename test/{new_tests => }/issue1262-version-inheritance/son/dub.sdl (100%) rename test/{new_tests => }/issue1262-version-inheritance/son/source/dummy.d (100%) rename test/{new_tests => }/issue1262-version-inheritance/source/app.d (100%) rename test/{new_tests => }/issue1262-version-inheritance/test.config (100%) rename test/{new_tests => }/issue1277/.gitignore (100%) rename test/{new_tests => }/issue1277/dub.json (100%) rename test/{new_tests => }/issue1277/sample/source/app.d (100%) rename test/{new_tests => }/issue1277/source/app.d (100%) rename "test/new_tests/issue130-unicode-\320\241\320\235\320\220\320\257\320\220\320\241\320\242\320\225\320\257\320\205/dub.sdl" => "test/issue130-unicode-\320\241\320\235\320\220\320\257\320\220\320\241\320\242\320\225\320\257\320\205/dub.sdl" (100%) rename "test/new_tests/issue130-unicode-\320\241\320\235\320\220\320\257\320\220\320\241\320\242\320\225\320\257\320\205/source/app.d" => "test/issue130-unicode-\320\241\320\235\320\220\320\257\320\220\320\241\320\242\320\225\320\257\320\205/source/app.d" (100%) rename test/{new_tests => }/issue1350-transitive-none-deps/.gitignore (100%) rename test/{new_tests => }/issue1350-transitive-none-deps/common-dep/common.d (100%) rename test/{new_tests => }/issue1350-transitive-none-deps/common-dep/dub.sdl (100%) rename test/{new_tests => }/issue1350-transitive-none-deps/common-none/dub.sdl (100%) rename test/{new_tests => }/issue1350-transitive-none-deps/dep1/dep1.d (100%) rename test/{new_tests => }/issue1350-transitive-none-deps/dep1/dub.sdl (100%) rename test/{new_tests => }/issue1350-transitive-none-deps/dep2/dep2.d (100%) rename test/{new_tests => }/issue1350-transitive-none-deps/dep2/dub.sdl (100%) rename test/{new_tests => }/issue1350-transitive-none-deps/dub.sdl (100%) rename test/{new_tests => }/issue1350-transitive-none-deps/test.config (100%) rename test/{new_tests => }/issue1350-transitive-none-deps/test.d (100%) rename test/{new_tests => }/issue1372-ignore-files-in-hidden-dirs/.gitignore (100%) rename test/{new_tests => }/issue1372-ignore-files-in-hidden-dirs/dub.json (100%) rename test/{new_tests => }/issue1372-ignore-files-in-hidden-dirs/sample/.hiddensource/hello.d (100%) rename test/{new_tests => }/issue1372-ignore-files-in-hidden-dirs/sample/dub.json (100%) rename test/{new_tests => }/issue1372-ignore-files-in-hidden-dirs/sample/source/.AppleDouble/app.d (100%) rename test/{new_tests => }/issue1372-ignore-files-in-hidden-dirs/sample/source/.compileMe/hello.d (100%) rename test/{new_tests => }/issue1372-ignore-files-in-hidden-dirs/sample/source/app.d (100%) rename test/{new_tests => }/issue1372-ignore-files-in-hidden-dirs/source/app.d (100%) rename test/{new_tests => }/issue1396-pre-post-run-commands/.gitignore (100%) rename test/{new_tests => }/issue1396-pre-post-run-commands/dub.json (100%) rename test/{new_tests => }/issue1396-pre-post-run-commands/sample/dub.sdl (100%) rename test/{new_tests => }/issue1396-pre-post-run-commands/sample/post-run.sh (100%) rename test/{new_tests => }/issue1396-pre-post-run-commands/sample/source/app.d (100%) rename test/{new_tests => }/issue1396-pre-post-run-commands/source/app.d (100%) rename test/{new_tests => }/issue1396-pre-post-run-commands/test.config (100%) rename test/{new_tests => }/issue1401-file-system-pkg-supplier/.gitignore (100%) rename test/{new_tests => }/issue1401-file-system-pkg-supplier/dub.json (100%) rename test/{new_tests => }/issue1401-file-system-pkg-supplier/sample/fs-json-dubpackage-1.0.7.zip (100%) rename test/{new_tests => }/issue1401-file-system-pkg-supplier/sample/fs-sdl-dubpackage-1.0.5.zip (100%) rename test/{new_tests => }/issue1401-file-system-pkg-supplier/sample/fs-sdl-dubpackage-1.0.6.zip (100%) rename test/{new_tests => }/issue1401-file-system-pkg-supplier/source/app.d (100%) rename test/{new_tests => }/issue1408-inherit-linker-files/.gitignore (100%) rename test/{new_tests => }/issue1408-inherit-linker-files/dep.d (100%) rename test/{new_tests => }/issue1408-inherit-linker-files/dub.sdl (100%) rename test/{new_tests => }/issue1408-inherit-linker-files/lib.d (100%) rename test/{new_tests => }/issue1408-inherit-linker-files/lib/dub.sdl (100%) rename test/{new_tests => }/issue1408-inherit-linker-files/lib/lib.d (100%) rename test/{new_tests => }/issue1408-inherit-linker-files/main.d (100%) rename test/{new_tests => }/issue1408-inherit-linker-files/test.config (100%) rename test/{new_tests => }/issue1416-maven-repo-pkg-supplier/dub.json (100%) rename test/{new_tests => }/issue1416-maven-repo-pkg-supplier/source/app.d (100%) rename test/{new_tests => }/issue1416-maven-repo-pkg-supplier/test.config (100%) rename test/{new_tests => }/issue1427-betterC/dub.json (100%) rename test/{new_tests => }/issue1427-betterC/source/app.d (100%) rename test/{new_tests => }/issue1447-build-settings-vars/.gitignore (100%) rename test/{new_tests => }/issue1447-build-settings-vars/dub.json (100%) rename test/{new_tests => }/issue1447-build-settings-vars/sample/dub.json (100%) rename test/{new_tests => }/issue1447-build-settings-vars/sample/source/app.d (100%) rename test/{new_tests => }/issue1447-build-settings-vars/sample/view-aarch64/arch (100%) rename test/{new_tests => }/issue1447-build-settings-vars/sample/view-x86/arch (100%) rename test/{new_tests => }/issue1447-build-settings-vars/sample/view-x86_64/arch (100%) rename test/{new_tests => }/issue1447-build-settings-vars/source/app.d (100%) rename test/{new_tests => }/issue1447-build-settings-vars/test.config (100%) rename test/{new_tests => }/issue1474-generate-source/.gitignore (100%) rename test/{new_tests => }/issue1474-generate-source/dub.json (100%) rename test/{new_tests => }/issue1474-generate-source/sample/dub.json (100%) rename test/{new_tests => }/issue1474-generate-source/sample/ext/kekw.d (100%) rename test/{new_tests => }/issue1474-generate-source/sample/source/app.d (100%) rename test/{new_tests => }/issue1474-generate-source/source/app.d (100%) rename test/{new_tests => }/issue1477-subpackage-visuald-paths/.gitignore (100%) rename test/{new_tests => }/issue1477-subpackage-visuald-paths/dub.json (100%) rename test/{new_tests => }/issue1477-subpackage-visuald-paths/sample/dub.sdl (100%) rename test/{new_tests => }/issue1477-subpackage-visuald-paths/sample/source/library.d (100%) rename test/{new_tests => }/issue1477-subpackage-visuald-paths/sample/sub/subpackage_a/dub.sdl (100%) rename test/{new_tests => }/issue1477-subpackage-visuald-paths/sample/sub/subpackage_a/source/subpackage_a.d (100%) rename test/{new_tests => }/issue1477-subpackage-visuald-paths/source/app.d (100%) rename test/{new_tests => }/issue1504-envvar-in-path/.gitignore (100%) rename test/{new_tests => }/issue1504-envvar-in-path/dub.json (100%) rename test/{new_tests => }/issue1504-envvar-in-path/sample/dub.json (100%) rename test/{new_tests => }/issue1504-envvar-in-path/sample/source/app.d (100%) rename test/{new_tests => }/issue1504-envvar-in-path/sample/teststrings/message.txt (100%) rename test/{new_tests => }/issue1504-envvar-in-path/source/app.d (100%) rename test/{new_tests => }/issue1505-single-file-package-dynamic-library/.gitignore (100%) rename test/{new_tests => }/issue1505-single-file-package-dynamic-library/dub.json (100%) rename test/{new_tests => }/issue1505-single-file-package-dynamic-library/sample.d (100%) rename test/{new_tests => }/issue1505-single-file-package-dynamic-library/source/app.d (100%) rename test/{new_tests => }/issue1524-maven-upgrade-dependency-tree/.gitignore (100%) rename test/{new_tests => }/issue1524-maven-upgrade-dependency-tree/dub.json (100%) rename test/{new_tests => }/issue1524-maven-upgrade-dependency-tree/sample/dub.json (100%) rename test/{new_tests => }/issue1524-maven-upgrade-dependency-tree/sample/maven/release/dubpackages/maven-dubpackage-a/1.0.5/maven-dubpackage-a-1.0.5.zip (100%) rename test/{new_tests => }/issue1524-maven-upgrade-dependency-tree/sample/maven/release/dubpackages/maven-dubpackage-a/maven-metadata.xml (100%) rename test/{new_tests => }/issue1524-maven-upgrade-dependency-tree/sample/maven/release/dubpackages/maven-dubpackage-b/1.0.6/maven-dubpackage-b-1.0.6.zip (100%) rename test/{new_tests => }/issue1524-maven-upgrade-dependency-tree/sample/maven/release/dubpackages/maven-dubpackage-b/maven-metadata.xml (100%) rename test/{new_tests => }/issue1524-maven-upgrade-dependency-tree/sample/source/app.d (100%) rename test/{new_tests => }/issue1524-maven-upgrade-dependency-tree/source/app.d (100%) rename test/{new_tests => }/issue1524-maven-upgrade-dependency-tree/test.config (100%) rename test/{new_tests => }/issue1531-toolchain-requirements/dub.json (100%) rename test/{new_tests => }/issue1531-toolchain-requirements/source/app.d (100%) rename test/{new_tests => }/issue1551-var-escaping/dub.json (100%) rename test/{new_tests => }/issue1551-var-escaping/source/app.d (100%) rename test/{new_tests => }/issue1556-fetch-and-build/.gitignore (100%) rename test/{new_tests => }/issue1556-fetch-and-build/dub.json (100%) rename test/{new_tests => }/issue1556-fetch-and-build/sample/dependency-package-1.0.0.zip (100%) rename test/{new_tests => }/issue1556-fetch-and-build/sample/main-package-1.0.0.zip (100%) rename test/{new_tests => }/issue1556-fetch-and-build/source/app.d (100%) rename test/{new_tests => }/issue1567-fetch-sub-package/.gitignore (100%) rename test/{new_tests => }/issue1567-fetch-sub-package/dub.json (100%) rename test/{new_tests => }/issue1567-fetch-sub-package/sample/fetch-sub-package-dubpackage-1.0.1.zip (100%) rename test/{new_tests => }/issue1567-fetch-sub-package/source/app.d (100%) rename test/{new_tests => }/issue1574-addcommand/dub.json (100%) rename test/{new_tests => }/issue1574-addcommand/source/app.d (100%) rename test/{new_tests => }/issue1574-addcommand/test.config (100%) rename test/{new_tests => }/issue1636-betterC-dub-test/.gitignore (100%) rename test/{new_tests => }/issue1636-betterC-dub-test/dub.json (100%) rename test/{new_tests => }/issue1636-betterC-dub-test/sample/dub.json (100%) rename test/{new_tests => }/issue1636-betterC-dub-test/sample/source/lib.d (100%) rename test/{new_tests => }/issue1636-betterC-dub-test/source/app.d (100%) rename test/{new_tests => }/issue1645-dflags-build/dub.json (100%) rename test/{new_tests => }/issue1645-dflags-build/source/app.d (100%) rename test/{new_tests => }/issue1645-dflags-build/test.config (100%) rename test/{new_tests => }/issue1651-custom-dub-init-type/.gitignore (100%) rename test/{new_tests => }/issue1651-custom-dub-init-type/dub.json (100%) rename test/{new_tests => }/issue1651-custom-dub-init-type/sample/custom-dub-init-dubpackage-1.0.1.zip (100%) rename test/{new_tests => }/issue1651-custom-dub-init-type/source/app.d (100%) rename test/{new_tests => }/issue1691-build-subpkg/.gitignore (100%) rename test/{new_tests => }/issue1691-build-subpkg/dub.json (100%) rename test/{new_tests => }/issue1691-build-subpkg/sample/dub.sdl (100%) rename test/{new_tests => }/issue1691-build-subpkg/sample/source/app.d (100%) rename test/{new_tests => }/issue1691-build-subpkg/sample/subpkg/dub.sdl (100%) rename test/{new_tests => }/issue1691-build-subpkg/sample/subpkg/source/subpkg.d (100%) rename test/{new_tests => }/issue1691-build-subpkg/source/app.d (100%) rename test/{new_tests => }/issue1739-project-settings-file/.gitignore (100%) rename test/{new_tests => }/issue1739-project-settings-file/dub.json (100%) rename test/{new_tests => }/issue1739-project-settings-file/sample/single.d (100%) rename test/{new_tests => }/issue1739-project-settings-file/source/app.d (100%) rename test/{new_tests => }/issue1773-lint/.gitignore (100%) rename test/{new_tests => }/issue1773-lint/dub.json (100%) rename test/{new_tests => }/issue1773-lint/sample/dub.json (100%) rename test/{new_tests => }/issue1773-lint/sample/source/app.d (100%) rename test/{new_tests => }/issue1773-lint/source/app.d (100%) rename test/{new_tests => }/issue1775/.gitignore (100%) rename test/{new_tests => }/issue1775/dub.json (100%) rename test/{new_tests => }/issue1775/issue1775.marker (100%) rename test/{new_tests => }/issue1775/source/app.d (100%) rename test/{new_tests => }/issue1788-incomplete-string-import-override/.gitignore (100%) rename test/{new_tests => }/issue1788-incomplete-string-import-override/b/dub.sdl (100%) rename test/{new_tests => }/issue1788-incomplete-string-import-override/b/source/b/foo.d (100%) rename test/{new_tests => }/issue1788-incomplete-string-import-override/b/views/layout.diet (100%) rename test/{new_tests => }/issue1788-incomplete-string-import-override/c/dub.sdl (100%) rename test/{new_tests => }/issue1788-incomplete-string-import-override/c/source/dummy.d (100%) rename test/{new_tests => }/issue1788-incomplete-string-import-override/c/views/fancylayout.diet (100%) rename test/{new_tests => }/issue1788-incomplete-string-import-override/dub.sdl (100%) rename test/{new_tests => }/issue1788-incomplete-string-import-override/source/app.d (100%) rename test/{new_tests => }/issue1788-incomplete-string-import-override/views/layout.diet (100%) rename test/{new_tests => }/issue1856-build-unittest/.gitignore (100%) rename test/{new_tests => }/issue1856-build-unittest/dub.json (100%) rename test/{new_tests => }/issue1856-build-unittest/sample/full_ut.d (100%) rename test/{new_tests => }/issue1856-build-unittest/sample/no_ut.d (100%) rename test/{new_tests => }/issue1856-build-unittest/sample/partial_ut.d (100%) rename test/{new_tests => }/issue1856-build-unittest/sample/partial_ut2.d (100%) rename test/{new_tests => }/issue1856-build-unittest/source/app.d (100%) rename test/{new_tests => }/issue1867-lowmem/.gitignore (100%) rename test/{new_tests => }/issue1867-lowmem/dub.json (100%) rename test/{new_tests => }/issue1867-lowmem/sample/dub.sdl (100%) rename test/{new_tests => }/issue1867-lowmem/sample/dub.settings.json (100%) rename test/{new_tests => }/issue1867-lowmem/sample/source/app.d (100%) rename test/{new_tests => }/issue1867-lowmem/source/app.d (100%) rename test/{new_tests => }/issue2012-dc-env/.gitignore (100%) rename test/{new_tests => }/issue2012-dc-env/dub.json (100%) rename test/{new_tests => }/issue2012-dc-env/sample/app.d (100%) rename test/{new_tests => }/issue2012-dc-env/source/app.d (100%) rename test/{new_tests => }/issue2046-ignored-optional-with-path/.gitignore (100%) rename test/{new_tests => }/issue2046-ignored-optional-with-path/dub.json (100%) rename test/{new_tests => }/issue2046-ignored-optional-with-path/sample/dub.json (100%) rename test/{new_tests => }/issue2046-ignored-optional-with-path/sample/dub.selections.json-nofoo (100%) rename test/{new_tests => }/issue2046-ignored-optional-with-path/sample/dub.selections.json-usefoo (100%) rename test/{new_tests => }/issue2046-ignored-optional-with-path/sample/libbar/dub.json (100%) rename test/{new_tests => }/issue2046-ignored-optional-with-path/sample/libbar/source/libbar/bar.d (100%) rename test/{new_tests => }/issue2046-ignored-optional-with-path/sample/libfoo/dub.json (100%) rename test/{new_tests => }/issue2046-ignored-optional-with-path/sample/libfoo/source/libfoo/foo.d (100%) rename test/{new_tests => }/issue2046-ignored-optional-with-path/sample/source/app.d (100%) rename test/{new_tests => }/issue2046-ignored-optional-with-path/source/app.d (100%) rename test/{new_tests => }/issue2051_running_unittests_from_dub_single_file_packages_fails/.gitignore (100%) rename test/{new_tests => }/issue2051_running_unittests_from_dub_single_file_packages_fails/dub.json (100%) rename test/{new_tests => }/issue2051_running_unittests_from_dub_single_file_packages_fails/single_failure.d (100%) rename test/{new_tests => }/issue2051_running_unittests_from_dub_single_file_packages_fails/single_success.d (100%) rename test/{new_tests => }/issue2051_running_unittests_from_dub_single_file_packages_fails/source/app.d (100%) rename test/{new_tests => }/issue2085-target-none-visuald/.gitignore (100%) rename test/{new_tests => }/issue2085-target-none-visuald/dub.json (100%) rename test/{new_tests => }/issue2085-target-none-visuald/sample/dub.json (100%) rename test/{new_tests => }/issue2085-target-none-visuald/sample/sub/dub.json (100%) rename test/{new_tests => }/issue2085-target-none-visuald/sample/sub/source/app.d (100%) rename test/{new_tests => }/issue2085-target-none-visuald/source/app.d (100%) rename test/{new_tests => }/issue2086-copyfiles-subpackage-targetpath/.gitignore (100%) rename test/{new_tests => }/issue2086-copyfiles-subpackage-targetpath/dub.json (100%) rename test/{new_tests => }/issue2086-copyfiles-subpackage-targetpath/sample/dub.json (100%) rename test/{new_tests => }/issue2086-copyfiles-subpackage-targetpath/sample/sub/dub.json (100%) rename test/{new_tests => }/issue2086-copyfiles-subpackage-targetpath/sample/sub/files/to_be_deployed.txt (100%) rename test/{new_tests => }/issue2086-copyfiles-subpackage-targetpath/sample/sub/source/app.d (100%) rename test/{new_tests => }/issue2086-copyfiles-subpackage-targetpath/source/app.d (100%) rename test/{new_tests => }/issue2190-unset-TEMP/.gitignore (100%) rename test/{new_tests => }/issue2190-unset-TEMP/dub.json (100%) rename test/{new_tests => }/issue2190-unset-TEMP/single.d (100%) rename test/{new_tests => }/issue2190-unset-TEMP/source/app.d (100%) rename test/{new_tests => }/issue2190-unset-TEMP/test.config (100%) rename test/{new_tests => }/issue2192-environment-variables/.gitignore (100%) rename test/{new_tests => }/issue2192-environment-variables/dub.json (100%) rename test/{new_tests => }/issue2192-environment-variables/sample/dub.sdl (100%) rename test/{new_tests => }/issue2192-environment-variables/sample/source/lib.d (100%) rename test/{new_tests => }/issue2192-environment-variables/source/app.d (100%) rename test/{new_tests => }/issue2234-copy-read-only-files/.gitignore (100%) rename test/{new_tests => }/issue2234-copy-read-only-files/dub.json (100%) rename test/{new_tests => }/issue2234-copy-read-only-files/sample/dub.json (100%) rename test/{new_tests => }/issue2234-copy-read-only-files/sample/files/images/to_be_deployed.img (100%) rename test/{new_tests => }/issue2234-copy-read-only-files/sample/files/to_be_deployed.bin (100%) rename test/{new_tests => }/issue2234-copy-read-only-files/sample/source/app.d (100%) rename test/{new_tests => }/issue2234-copy-read-only-files/source/app.d (100%) rename test/{new_tests => }/issue2258-dynLib-exe-dep/dub.json (100%) rename test/{new_tests => }/issue2258-dynLib-exe-dep/source/app.d (100%) rename test/{new_tests => }/issue2258-dynLib-exe-dep/test.config (100%) rename test/{new_tests => }/issue2262-exact-cached-version-match/.gitignore (100%) rename test/{new_tests => }/issue2262-exact-cached-version-match/dub.json (100%) rename test/{new_tests => }/issue2262-exact-cached-version-match/sample/dub.sdl (100%) rename test/{new_tests => }/issue2262-exact-cached-version-match/sample/source/app.d (100%) rename test/{new_tests => }/issue2262-exact-cached-version-match/source/app.d (100%) rename test/{new_tests => }/issue2348-postbuildcommands/.gitignore (100%) rename test/{new_tests => }/issue2348-postbuildcommands/dub.json (100%) rename test/{new_tests => }/issue2348-postbuildcommands/single.d (100%) rename test/{new_tests => }/issue2348-postbuildcommands/source/app.d (100%) rename test/{new_tests => }/issue2377-dynLib-dep-extra-files/.gitignore (100%) rename test/{new_tests => }/issue2377-dynLib-dep-extra-files/dub.json (100%) rename test/{new_tests => }/issue2377-dynLib-dep-extra-files/sample/dep1/dub.sdl (100%) rename test/{new_tests => }/issue2377-dynLib-dep-extra-files/sample/dep1/source/dep1.d (100%) rename test/{new_tests => }/issue2377-dynLib-dep-extra-files/sample/dep2/dub.sdl (100%) rename test/{new_tests => }/issue2377-dynLib-dep-extra-files/sample/dep2/source/dep2.d (100%) rename test/{new_tests => }/issue2377-dynLib-dep-extra-files/sample/framework/dub.sdl (100%) rename test/{new_tests => }/issue2377-dynLib-dep-extra-files/sample/parent/dub.sdl (100%) rename test/{new_tests => }/issue2377-dynLib-dep-extra-files/sample/parent/source/app.d (100%) rename test/{new_tests => }/issue2377-dynLib-dep-extra-files/sample/parent/source/parent.d (100%) rename test/{new_tests => }/issue2377-dynLib-dep-extra-files/source/app.d (100%) rename test/{new_tests => }/issue2448/.gitignore (100%) rename test/{new_tests => }/issue2448/dub.json (100%) rename test/{new_tests => }/issue2448/ext/kekw.d (100%) rename test/{new_tests => }/issue2448/source/app.d (100%) rename test/{new_tests => }/issue2452/dub.json (100%) rename test/{new_tests => }/issue2452/source/app.d (100%) rename test/{new_tests => }/issue2574-mistyping-commands/dub.json (100%) rename test/{new_tests => }/issue2574-mistyping-commands/source/app.d (100%) rename test/{new_tests => }/issue2587-subpackage-dependency-resolution/.gitignore (100%) rename test/{new_tests => }/issue2587-subpackage-dependency-resolution/dub.json (100%) rename test/{new_tests => }/issue2587-subpackage-dependency-resolution/sample/a/dub.json (100%) rename test/{new_tests => }/issue2587-subpackage-dependency-resolution/sample/a/source/app.d (100%) rename test/{new_tests => }/issue2587-subpackage-dependency-resolution/sample/b/dub.json (100%) rename test/{new_tests => }/issue2587-subpackage-dependency-resolution/sample/b/source/b.d (100%) rename test/{new_tests => }/issue2587-subpackage-dependency-resolution/sample/c/dub.json (100%) rename test/{new_tests => }/issue2587-subpackage-dependency-resolution/sample/c/source/c.d (100%) rename test/{new_tests => }/issue2587-subpackage-dependency-resolution/source/app.d (100%) rename test/{new_tests => }/issue2650-deprecated-modules/dub.sdl (100%) rename test/{new_tests => }/issue2650-deprecated-modules/source/test.d (100%) rename test/{new_tests => }/issue2650-deprecated-modules/test.config (100%) rename test/{new_tests => }/issue2684-recipe-file/.gitignore (100%) rename test/{new_tests => }/issue2684-recipe-file/dub.json (100%) rename test/{new_tests => }/issue2684-recipe-file/sample/anotherSource/app.d (100%) rename test/{new_tests => }/issue2684-recipe-file/sample/dub.json (100%) rename test/{new_tests => }/issue2684-recipe-file/sample/dubWithAnotherSource.json (100%) rename test/{new_tests => }/issue2684-recipe-file/sample/source/app.d (100%) rename test/{new_tests => }/issue2684-recipe-file/source/app.d (100%) rename test/{new_tests => }/issue2698-cimportpaths-broken-with-dmd-ldc/.gitignore (100%) rename test/{new_tests => }/issue2698-cimportpaths-broken-with-dmd-ldc/c_headers/foo.h (100%) rename test/{new_tests => }/issue2698-cimportpaths-broken-with-dmd-ldc/dub.sdl (100%) rename test/{new_tests => }/issue2698-cimportpaths-broken-with-dmd-ldc/source/app.d (100%) rename test/{new_tests => }/issue2698-cimportpaths-broken-with-dmd-ldc/source/foo.c (100%) rename test/{new_tests => }/issue2698-cimportpaths-broken-with-dmd-ldc/test.config (100%) rename test/{new_tests => }/issue2840-build-collision/.gitignore (100%) rename test/{new_tests => }/issue2840-build-collision/dub.json (100%) rename test/{new_tests => }/issue2840-build-collision/sample/build.d (100%) rename test/{new_tests => }/issue2840-build-collision/source/app.d (100%) rename test/{new_tests => }/issue346-redundant-flags/.gitignore (100%) rename test/{new_tests => }/issue346-redundant-flags/dub.json (100%) rename test/{new_tests => }/issue346-redundant-flags/sample/a/dub.json (100%) rename test/{new_tests => }/issue346-redundant-flags/sample/a/source/a.d (100%) rename test/{new_tests => }/issue346-redundant-flags/sample/b/dub.json (100%) rename test/{new_tests => }/issue346-redundant-flags/sample/b/source/b.d (100%) rename test/{new_tests => }/issue346-redundant-flags/sample/main/dub.json (100%) rename test/{new_tests => }/issue346-redundant-flags/sample/main/source/main.d (100%) rename test/{new_tests => }/issue346-redundant-flags/source/app.d (100%) rename test/{new_tests => }/issue361-optional-deps/.gitignore (100%) rename test/{new_tests => }/issue361-optional-deps/dub.json (100%) rename test/{new_tests => }/issue361-optional-deps/sample/a/dub.sdl (100%) rename test/{new_tests => }/issue361-optional-deps/sample/a/src/a.d (100%) rename test/{new_tests => }/issue361-optional-deps/sample/b/dub.sdl (100%) rename test/{new_tests => }/issue361-optional-deps/sample/b/src/b.d (100%) rename test/{new_tests => }/issue361-optional-deps/sample/main1/dub.sdl (100%) rename test/{new_tests => }/issue361-optional-deps/sample/main1/src/main1.d (100%) rename test/{new_tests => }/issue361-optional-deps/sample/main2/dub.sdl (100%) rename test/{new_tests => }/issue361-optional-deps/sample/main2/dub.selections.json (100%) rename test/{new_tests => }/issue361-optional-deps/sample/main2/src/main2.d (100%) rename test/{new_tests => }/issue361-optional-deps/source/app.d (100%) rename test/{new_tests => }/issue502-root-import/dub.json (100%) rename test/{new_tests => }/issue502-root-import/source/app.d (100%) rename test/{new_tests => }/issue564-invalid-upgrade-dependency/.gitignore (100%) rename test/{new_tests => }/issue564-invalid-upgrade-dependency/dub.json (100%) rename test/{new_tests => }/issue564-invalid-upgrade-dependency/sample/a-1.0.0/dub.json (100%) rename test/{new_tests => }/issue564-invalid-upgrade-dependency/sample/a-1.0.0/source/a.d (100%) rename test/{new_tests => }/issue564-invalid-upgrade-dependency/sample/a-1.1.0/dub.json (100%) rename test/{new_tests => }/issue564-invalid-upgrade-dependency/sample/a-1.1.0/source/a.d (100%) rename test/{new_tests => }/issue564-invalid-upgrade-dependency/sample/main/dub.json (100%) rename test/{new_tests => }/issue564-invalid-upgrade-dependency/sample/main/dub.selections.json (100%) rename test/{new_tests => }/issue564-invalid-upgrade-dependency/sample/main/source/app.d (100%) rename test/{new_tests => }/issue564-invalid-upgrade-dependency/source/app.d (100%) rename test/{new_tests => }/issue586-subpack-dep/.gitignore (100%) rename test/{new_tests => }/issue586-subpack-dep/dub.json (100%) rename test/{new_tests => }/issue586-subpack-dep/sample/a/b/dub.sdl (100%) rename test/{new_tests => }/issue586-subpack-dep/sample/a/b/source/b.d (100%) rename test/{new_tests => }/issue586-subpack-dep/sample/a/dub.sdl (100%) rename test/{new_tests => }/issue586-subpack-dep/sample/a/source/a.d (100%) rename test/{new_tests => }/issue586-subpack-dep/sample/main/dub.sdl (100%) rename test/{new_tests => }/issue586-subpack-dep/sample/main/dub.selections.json (100%) rename test/{new_tests => }/issue586-subpack-dep/sample/main/source/c.d (100%) rename test/{new_tests => }/issue586-subpack-dep/source/app.d (100%) rename test/{new_tests => }/issue613-dynlib-pic/dub.sdl (100%) rename test/{new_tests => }/issue613-dynlib-pic/source/app.d (100%) rename test/{new_tests => }/issue613-dynlib-pic/test.config (100%) rename test/{new_tests => }/issue616-describe-vs-generate-commands/.gitignore (100%) rename test/{new_tests => }/issue616-describe-vs-generate-commands/dub.json (100%) rename test/{new_tests => }/issue616-describe-vs-generate-commands/sample/issue616-describe-vs-generate-commands/do-preGenerateCommands.sh (100%) rename test/{new_tests => }/issue616-describe-vs-generate-commands/sample/issue616-describe-vs-generate-commands/dub.json (100%) rename test/{new_tests => }/issue616-describe-vs-generate-commands/sample/issue616-describe-vs-generate-commands/src/dummy.d (100%) rename test/{new_tests => }/issue616-describe-vs-generate-commands/sample/issue616-subpack/dub.json (100%) rename test/{new_tests => }/issue616-describe-vs-generate-commands/sample/issue616-subpack/src/dummy.d (100%) rename test/{new_tests => }/issue616-describe-vs-generate-commands/sample/issue616-subsubpack/dub.json (100%) rename test/{new_tests => }/issue616-describe-vs-generate-commands/sample/issue616-subsubpack/src/dummy.d (100%) rename test/{new_tests => }/issue616-describe-vs-generate-commands/source/app.d (100%) rename test/{new_tests => }/issue672-upgrade-optional/.gitignore (100%) rename test/{new_tests => }/issue672-upgrade-optional/dub.json (100%) rename test/{new_tests => }/issue672-upgrade-optional/sample/dub.sdl (100%) rename test/{new_tests => }/issue672-upgrade-optional/source/app.d (100%) rename test/{new_tests => }/issue674-concurrent-dub/dub.json (100%) rename test/{new_tests => }/issue674-concurrent-dub/source/app.d (100%) rename test/{new_tests => }/issue686-multiple-march/.gitignore (100%) rename test/{new_tests => }/issue686-multiple-march/dub.json (100%) rename test/{new_tests => }/issue686-multiple-march/sample/a/dub.json (100%) rename test/{new_tests => }/issue686-multiple-march/sample/a/source/a.d (100%) rename test/{new_tests => }/issue686-multiple-march/sample/b/dub.json (100%) rename test/{new_tests => }/issue686-multiple-march/sample/b/source/b.d (100%) rename test/{new_tests => }/issue686-multiple-march/sample/main/dub.json (100%) rename test/{new_tests => }/issue686-multiple-march/sample/main/source/main.d (100%) rename test/{new_tests => }/issue686-multiple-march/source/app.d (100%) rename test/{new_tests => }/issue754-path-selection-fail/.gitignore (100%) rename test/{new_tests => }/issue754-path-selection-fail/a-1.0/dub.sdl (100%) rename test/{new_tests => }/issue754-path-selection-fail/a-1.0/source/a.d (100%) rename test/{new_tests => }/issue754-path-selection-fail/a-2.0/dub.sdl (100%) rename test/{new_tests => }/issue754-path-selection-fail/dub.sdl (100%) rename test/{new_tests => }/issue754-path-selection-fail/dub.selections.json (100%) rename test/{new_tests => }/issue754-path-selection-fail/source/app.d (100%) rename test/{new_tests => }/issue777-bogus-path-dependency/.gitignore (100%) rename test/{new_tests => }/issue777-bogus-path-dependency/b/a.d (100%) rename test/{new_tests => }/issue777-bogus-path-dependency/b/dub.sdl (100%) rename test/{new_tests => }/issue777-bogus-path-dependency/c-err/dub.sdl (100%) rename test/{new_tests => }/issue777-bogus-path-dependency/c-err/source/lib.d (100%) rename test/{new_tests => }/issue777-bogus-path-dependency/c/dub.sdl (100%) rename test/{new_tests => }/issue777-bogus-path-dependency/c/source/lib.d (100%) rename test/{new_tests => }/issue777-bogus-path-dependency/dub.sdl (100%) rename test/{new_tests => }/issue777-bogus-path-dependency/dub.selections.json (100%) rename test/{new_tests => }/issue777-bogus-path-dependency/source/app.d (100%) rename test/{new_tests => }/issue782-gtkd-pkg-config/.gitignore (100%) rename test/{new_tests => }/issue782-gtkd-pkg-config/dub.json (100%) rename test/{new_tests => }/issue782-gtkd-pkg-config/sample/fake-gtkd/dub.json (100%) rename test/{new_tests => }/issue782-gtkd-pkg-config/sample/fake-gtkd/pkgconfig/fake-gtkd.pc (100%) rename test/{new_tests => }/issue782-gtkd-pkg-config/sample/fake-gtkd/src/fakegtkd.d (100%) rename test/{new_tests => }/issue782-gtkd-pkg-config/sample/fake-gtkd/src/lib.d (100%) rename test/{new_tests => }/issue782-gtkd-pkg-config/sample/main/dub.json (100%) rename test/{new_tests => }/issue782-gtkd-pkg-config/sample/main/src/app.d (100%) rename test/{new_tests => }/issue782-gtkd-pkg-config/source/app.d (100%) rename test/{new_tests => }/issue782-gtkd-pkg-config/test.config (100%) rename test/{new_tests => }/issue813-fixed-dependency/.gitignore (100%) rename test/{new_tests => }/issue813-fixed-dependency/dub.json (100%) rename test/{new_tests => }/issue813-fixed-dependency/sample/main/dub.sdl (100%) rename test/{new_tests => }/issue813-fixed-dependency/sample/main/dub.selections.json (100%) rename test/{new_tests => }/issue813-fixed-dependency/sample/main/src/app.d (100%) rename test/{new_tests => }/issue813-fixed-dependency/sample/sub/dub.sdl (100%) rename test/{new_tests => }/issue813-fixed-dependency/sample/sub/sub/dub.sdl (100%) rename test/{new_tests => }/issue813-fixed-dependency/sample/sub/sub/src/sub/test.d (100%) rename test/{new_tests => }/issue813-fixed-dependency/source/app.d (100%) rename test/{new_tests => }/issue813-pure-sub-dependency/.gitignore (100%) rename test/{new_tests => }/issue813-pure-sub-dependency/dub.json (100%) rename test/{new_tests => }/issue813-pure-sub-dependency/sample/main/dub.sdl (100%) rename test/{new_tests => }/issue813-pure-sub-dependency/sample/main/src/app.d (100%) rename test/{new_tests => }/issue813-pure-sub-dependency/sample/sub/dub.sdl (100%) rename test/{new_tests => }/issue813-pure-sub-dependency/sample/sub/sub/dub.sdl (100%) rename test/{new_tests => }/issue813-pure-sub-dependency/sample/sub/sub/src/sub/test.d (100%) rename test/{new_tests => }/issue813-pure-sub-dependency/source/app.d (100%) rename test/{new_tests => }/issue820-extra-fields-after-convert/.gitignore (100%) rename test/{new_tests => }/issue820-extra-fields-after-convert/dub.json (100%) rename test/{new_tests => }/issue820-extra-fields-after-convert/sample/dub.json (100%) rename test/{new_tests => }/issue820-extra-fields-after-convert/source/app.d (100%) rename test/{new_tests => }/issue838-custom-cache-paths/.gitignore (100%) rename test/{new_tests => }/issue838-custom-cache-paths/dub.json (100%) rename test/{new_tests => }/issue838-custom-cache-paths/sample/cache/foo/1.0.0/foo/dub.sdl (100%) rename test/{new_tests => }/issue838-custom-cache-paths/sample/dub.sdl (100%) rename test/{new_tests => }/issue838-custom-cache-paths/sample/source/app.d (100%) rename test/{new_tests => }/issue838-custom-cache-paths/source/app.d (100%) rename test/{new_tests => }/issue877-auto-fetch-package-on-run/dub.json (100%) rename test/{new_tests => }/issue877-auto-fetch-package-on-run/source/app.d (100%) rename test/{new_tests => }/issue884-init-defer-file-creation/dub.json (100%) rename test/{new_tests => }/issue884-init-defer-file-creation/source/app.d (100%) rename test/{new_tests => }/issue895-local-configuration/.gitignore (100%) rename test/{new_tests => }/issue895-local-configuration/dub.json (100%) rename test/{new_tests => }/issue895-local-configuration/sample/dub.json (100%) rename test/{new_tests => }/issue895-local-configuration/sample/source/app.d (100%) rename test/{new_tests => }/issue895-local-configuration/source/app.d (100%) rename test/{new_tests => }/issue895-local-configuration/test.config (100%) rename test/{new_tests => }/issue923-subpackage-deps/.gitignore (100%) rename test/{new_tests => }/issue923-subpackage-deps/dub.json (100%) rename test/{new_tests => }/issue923-subpackage-deps/sample/a/dub.sdl (100%) rename test/{new_tests => }/issue923-subpackage-deps/sample/b/dub.sdl (100%) rename test/{new_tests => }/issue923-subpackage-deps/sample/b/source/b.d (100%) rename test/{new_tests => }/issue923-subpackage-deps/sample/main/dub.sdl (100%) rename test/{new_tests => }/issue923-subpackage-deps/sample/main/source/app.d (100%) rename test/{new_tests => }/issue923-subpackage-deps/source/app.d (100%) rename test/{new_tests => }/issue934-path-dep/.gitignore (100%) rename test/{new_tests => }/issue934-path-dep/dub.json (100%) rename test/{new_tests => }/issue934-path-dep/sample/a/dub.sdl (100%) rename test/{new_tests => }/issue934-path-dep/sample/b/dub.sdl (100%) rename test/{new_tests => }/issue934-path-dep/sample/b/source/b.d (100%) rename test/{new_tests => }/issue934-path-dep/sample/main/dub.sdl (100%) rename test/{new_tests => }/issue934-path-dep/sample/main/source/app.d (100%) rename test/{new_tests => }/issue934-path-dep/source/app.d (100%) rename test/{new_tests => }/issue959-path-based-subpack-dep/.gitignore (100%) rename test/{new_tests => }/issue959-path-based-subpack-dep/dub.sdl (100%) rename test/{new_tests => }/issue959-path-based-subpack-dep/foo/dub.sdl (100%) rename test/{new_tests => }/issue959-path-based-subpack-dep/main.d (100%) rename test/{new_tests => }/issue97-targettype-none-nodeps/.gitignore (100%) rename test/{new_tests => }/issue97-targettype-none-nodeps/a/dub.sdl (100%) rename test/{new_tests => }/issue97-targettype-none-nodeps/a/source/app.d (100%) rename test/{new_tests => }/issue97-targettype-none-nodeps/b/dub.sdl (100%) rename test/{new_tests => }/issue97-targettype-none-nodeps/b/source/app.d (100%) rename test/{new_tests => }/issue97-targettype-none-nodeps/dub.sdl (100%) rename test/{new_tests => }/issue97-targettype-none-nodeps/test.config (100%) rename test/{new_tests => }/issue97-targettype-none-onerecipe/.gitignore (100%) rename test/{new_tests => }/issue97-targettype-none-onerecipe/a/source/app.d (100%) rename test/{new_tests => }/issue97-targettype-none-onerecipe/b/source/app.d (100%) rename test/{new_tests => }/issue97-targettype-none-onerecipe/dub.sdl (100%) rename test/{new_tests => }/issue97-targettype-none-onerecipe/test.config (100%) rename test/{new_tests => }/issue97-targettype-none/.gitignore (100%) rename test/{new_tests => }/issue97-targettype-none/dub.json (100%) rename test/{new_tests => }/issue97-targettype-none/sample/a/dub.sdl (100%) rename test/{new_tests => }/issue97-targettype-none/sample/a/source/app.d (100%) rename test/{new_tests => }/issue97-targettype-none/sample/b/dub.sdl (100%) rename test/{new_tests => }/issue97-targettype-none/sample/b/source/app.d (100%) rename test/{new_tests => }/issue97-targettype-none/sample/dub.sdl (100%) rename test/{new_tests => }/issue97-targettype-none/source/app.d (100%) rename test/{new_tests => }/issue990-download-optional-selected/.gitignore (100%) rename test/{new_tests => }/issue990-download-optional-selected/dub.json (100%) rename test/{new_tests => }/issue990-download-optional-selected/sample/dub.sdl (100%) rename test/{new_tests => }/issue990-download-optional-selected/sample/dub.selections.json (100%) rename test/{new_tests => }/issue990-download-optional-selected/sample/source/app.d (100%) rename test/{new_tests => }/issue990-download-optional-selected/source/app.d (100%) rename test/{new_tests => }/mutex-main-1/dub.json (100%) rename test/{new_tests => }/mutex-main-1/source/app.d (100%) rename test/{new_tests => }/mutex-main-1/source/app2.d (100%) rename test/{new_tests => }/mutex-main-1/test.config (100%) rename test/{new_tests => }/mutex-main-2/dub.json (100%) rename test/{new_tests => }/mutex-main-2/source/app.d (100%) rename test/{new_tests => }/mutex-main-2/source/app2.d (100%) rename test/{new_tests => }/mutex-main-2/test.config (100%) rename test/{new_tests => }/mutex-main-3/dub.json (100%) rename test/{new_tests => }/mutex-main-3/source/app.d (100%) rename test/{new_tests => }/mutex-main-3/source/app2.d (100%) rename test/{new_tests => }/mutex-main-3/test.config (100%) delete mode 100644 test/new_tests/.gitignore rename test/{new_tests => }/path-subpackage-ref/.gitignore (100%) rename test/{new_tests => }/path-subpackage-ref/dub.json (100%) rename test/{new_tests => }/path-subpackage-ref/source/app.d (100%) rename test/{new_tests => }/path-subpackage-ref/subpack/dub.json (100%) rename test/{new_tests => }/path-subpackage-ref/subpack/source/lib.d (100%) rename test/{new_tests => }/pr1549-dub-exe-var/.gitignore (100%) rename test/{new_tests => }/pr1549-dub-exe-var/dub.json (100%) rename test/{new_tests => }/pr1549-dub-exe-var/sample/dub.sdl (100%) rename test/{new_tests => }/pr1549-dub-exe-var/sample/setmsg.d (100%) rename test/{new_tests => }/pr1549-dub-exe-var/sample/source/app.d (100%) rename test/{new_tests => }/pr1549-dub-exe-var/source/app.d (100%) rename test/{new_tests => }/pr2642-cache-db/dub.sdl (100%) rename test/{new_tests => }/pr2642-cache-db/source/test_cache_db.d (100%) rename test/{new_tests => }/pr2644-describe-artifact-path/dub.sdl (100%) rename test/{new_tests => }/pr2644-describe-artifact-path/source/describe_artifact_path.d (100%) rename test/{new_tests => }/pr2647-build-deep/.gitignore (100%) rename test/{new_tests => }/pr2647-build-deep/dub.sdl (100%) rename test/{new_tests => }/pr2647-build-deep/sample/dub.sdl (100%) rename test/{new_tests => }/pr2647-build-deep/sample/source/lib.d (100%) rename test/{new_tests => }/pr2647-build-deep/source/test_build_deep.d (100%) rename test/{new_tests => }/removed-dub-obj/.gitignore (100%) rename test/{new_tests => }/removed-dub-obj/dub.json (100%) rename test/{new_tests => }/removed-dub-obj/sample/dub.sdl (100%) rename test/{new_tests => }/removed-dub-obj/sample/source/test.d (100%) rename test/{new_tests => }/removed-dub-obj/source/app.d (100%) rename test/{new_tests => }/sdl-package-simple/dub.sdl (100%) rename test/{new_tests => }/sdl-package-simple/source/app.d (100%) rename test/{new_tests => }/single-file-sdl-default-name/.gitignore (100%) rename test/{new_tests => }/single-file-sdl-default-name/dub.json (100%) rename test/{new_tests => }/single-file-sdl-default-name/single-file-sdl-default-name-sample.d (100%) rename test/{new_tests => }/single-file-sdl-default-name/source/app.d (100%) rename test/{new_tests => }/subpackage-common-with-sourcefile-globbing/.gitignore (100%) rename test/{new_tests => }/subpackage-common-with-sourcefile-globbing/dub.json (100%) rename test/{new_tests => }/subpackage-common-with-sourcefile-globbing/sample/code/mypackage/client/app.d (100%) rename test/{new_tests => }/subpackage-common-with-sourcefile-globbing/sample/code/mypackage/client/extra.d (100%) rename test/{new_tests => }/subpackage-common-with-sourcefile-globbing/sample/code/mypackage/common/blah.d (100%) rename test/{new_tests => }/subpackage-common-with-sourcefile-globbing/sample/code/mypackage/server/app.d (100%) rename test/{new_tests => }/subpackage-common-with-sourcefile-globbing/sample/code/mypackage/server/extra.d (100%) rename test/{new_tests => }/subpackage-common-with-sourcefile-globbing/sample/dub.sdl (100%) rename test/{new_tests => }/subpackage-common-with-sourcefile-globbing/source/app.d (100%) rename test/{new_tests => }/subpackage-ref/dub.json (100%) rename test/{new_tests => }/subpackage-ref/source/app.d (100%) rename test/{new_tests => }/test-upgrade-subpackages/.gitignore (100%) rename test/{new_tests => }/test-upgrade-subpackages/dub.json (100%) rename test/{new_tests => }/test-upgrade-subpackages/sample/dub.json (100%) rename test/{new_tests => }/test-upgrade-subpackages/sample/source/app.d (100%) rename test/{new_tests => }/test-upgrade-subpackages/sample/subpack/dub.json (100%) rename test/{new_tests => }/test-upgrade-subpackages/sample/subpack/source/lib.d (100%) rename test/{new_tests => }/test-upgrade-subpackages/source/app.d (100%) rename test/{new_tests => }/test-version-opt/dub.json (100%) rename test/{new_tests => }/test-version-opt/source/app.d (100%) rename test/{new_tests => }/timeout/dub.json (100%) rename test/{new_tests => }/timeout/source/app.d (100%) rename test/{new_tests => }/unittest-cov-ctfe/dub.sdl (100%) rename test/{new_tests => }/unittest-cov-ctfe/source/mod.d (100%) rename test/{new_tests => }/unittest-cov-ctfe/test.config (100%) rename test/{new_tests => }/use-c-sources/dub.json (100%) rename test/{new_tests => }/use-c-sources/source/app.d (100%) rename test/{new_tests => }/use-c-sources/source/some_c_code.c (100%) rename test/{new_tests => }/use-c-sources/source/some_c_code.h (100%) rename test/{new_tests => }/use-c-sources/test.config (100%) rename test/{new_tests => }/version-filters-diamond/.gitignore (100%) rename test/{new_tests => }/version-filters-diamond/daughter/dub.sdl (100%) rename test/{new_tests => }/version-filters-diamond/daughter/source/dummy.d (100%) rename test/{new_tests => }/version-filters-diamond/diamond/.gitignore (100%) rename test/{new_tests => }/version-filters-diamond/diamond/dub.sdl (100%) rename test/{new_tests => }/version-filters-diamond/diamond/source/dummy.d (100%) rename test/{new_tests => }/version-filters-diamond/dub.sdl (100%) rename test/{new_tests => }/version-filters-diamond/son/dub.sdl (100%) rename test/{new_tests => }/version-filters-diamond/son/source/dummy.d (100%) rename test/{new_tests => }/version-filters-diamond/source/app.d (100%) rename test/{new_tests => }/version-filters-diamond/test.config (100%) rename test/{new_tests => }/version-filters-none/dub.sdl (100%) rename test/{new_tests => }/version-filters-none/source/app.d (100%) rename test/{new_tests => }/version-filters-none/test.config (100%) rename test/{new_tests => }/version-filters-source-dep/.gitignore (100%) rename test/{new_tests => }/version-filters-source-dep/dub.sdl (100%) rename test/{new_tests => }/version-filters-source-dep/source-dep/dub.sdl (100%) rename test/{new_tests => }/version-filters-source-dep/source-dep/source/dummy.d (100%) rename test/{new_tests => }/version-filters-source-dep/source/app.d (100%) rename test/{new_tests => }/version-filters-source-dep/test.config (100%) rename test/{new_tests => }/version-filters/.gitignore (100%) rename test/{new_tests => }/version-filters/daughter/dub.sdl (100%) rename test/{new_tests => }/version-filters/daughter/source/dummy.d (100%) rename test/{new_tests => }/version-filters/dub.sdl (100%) rename test/{new_tests => }/version-filters/son/dub.sdl (100%) rename test/{new_tests => }/version-filters/son/source/dummy.d (100%) rename test/{new_tests => }/version-filters/source/app.d (100%) rename test/{new_tests => }/version-filters/test.config (100%) rename test/{new_tests => }/version-spec/.gitignore (100%) rename test/{new_tests => }/version-spec/dub.json (100%) rename test/{new_tests => }/version-spec/sample/newfoo/dub.sdl (100%) rename test/{new_tests => }/version-spec/sample/newfoo/source/app.d (100%) rename test/{new_tests => }/version-spec/sample/oldfoo/dub.sdl (100%) rename test/{new_tests => }/version-spec/sample/oldfoo/source/app.d (100%) rename test/{new_tests => }/version-spec/source/app.d (100%) rename test/{new_tests => }/win32_default/.gitignore (100%) rename test/{new_tests => }/win32_default/dub.json (100%) rename test/{new_tests => }/win32_default/sample.d (100%) rename test/{new_tests => }/win32_default/source/app.d (100%) rename test/{new_tests => }/win32_default/test.config (100%) diff --git a/test/.gitignore b/test/.gitignore index bc2a8bc176..85976cab59 100644 --- a/test/.gitignore +++ b/test/.gitignore @@ -2,70 +2,15 @@ *.lib *.so *.dll - -1-exec-simple/exec-simple -1-staticLib-simple/__test__library__ -2-dynLib-dep/dynlib-dep -2-sourceLib-dep/sourcelib-dep -2-staticLib-dep/staticlib-dep -custom-unittest/custom-unittest -path-subpackage-ref/test -subpackage-ref/test -subpackage-common-with-sourcefile-globbing/mypackage* -version-spec/**/CMakeLists.txt -version-spec/**/foo.cmake -version-spec/**/foo - -/test_registry -/issue_2051_running_unittests_from_dub_single_file_packages_fails /run-unittest - test.log -custom-source-main-bug487/custom-source-main-bug487 -3-copyFiles/bin/ -ignore-hidden-1/ignore-hidden-1 -ignore-hidden-2/ignore-hidden-2 -expected-import-path-output -expected-string-import-path-output -expected-describe-data-1-list-output -expected-describe-data-2-dmd-output -expected-issue616-output -describe-project/dummy.dat -describe-project/dummy-dep1.dat -*/main/main -*/*test-library -*/*test-application -*/exec-simple -issue1474/ext/fortytwo.d -issue2452/ext/fortytwo.d - -cov-ctfe/test -issue1003-check-empty-ld-flags/issue1003-empty-ld-flags -issue1053-extra-files-visuald/LICENSE.txt -issue1053-extra-files-visuald/README.txt -issue1053-extra-files-visuald/extra_files.sln -issue1117-extra-dependency-files/test -issue1396-pre-post-run-commands/test -issue1396-pre-post-run-commands/test.txt -issue1477-subpackage-visuald-paths/library_subpackage_a.sln -issue1477-subpackage-visuald-paths/sub/subpackage_a/subpackage_a.sln -issue1504-envvar-in-path/test -issue1773-lint/report.json -issue2085-target-none-visuald/root.sln -issue2086-copyfiles-subpackage-targetpath/sub/sub -issue2086-copyfiles-subpackage-targetpath/sub/to_be_deployed.txt -issue2262-exact-cached-version-match/testproj -issue361-optional-deps/cmp.tmp -issue838-custom-cache-paths/test -issue97-targettype-none/a/issue97-targettype-none_a -issue97-targettype-none/b/issue97-targettype-none_b -issue990-download-optional-selected/b -output-1504.txt -version-filters-diamond/version-filters-diamond -version-filters-none/version-filters-none -version-filters-source-dep/version-filters-source-dep -version-filters/version-filters -version-spec/newfoo/foo-test-application -version-spec/oldfoo/foo-test-application - -!new_tests/* +*/* +!*/dub.json +!*/dub.sdl +!*/package.json +!*/run.d +!*/run.sh +!*/source +!*/.gitignore +!*/test.config +!extra/* diff --git a/test/new_tests/0-init-fail-json/dub.sdl b/test/0-init-fail-json/dub.sdl similarity index 100% rename from test/new_tests/0-init-fail-json/dub.sdl rename to test/0-init-fail-json/dub.sdl diff --git a/test/new_tests/0-init-fail-json/source/app.d b/test/0-init-fail-json/source/app.d similarity index 100% rename from test/new_tests/0-init-fail-json/source/app.d rename to test/0-init-fail-json/source/app.d diff --git a/test/new_tests/0-init-fail/dub.sdl b/test/0-init-fail/dub.sdl similarity index 100% rename from test/new_tests/0-init-fail/dub.sdl rename to test/0-init-fail/dub.sdl diff --git a/test/new_tests/0-init-fail/source/app.d b/test/0-init-fail/source/app.d similarity index 100% rename from test/new_tests/0-init-fail/source/app.d rename to test/0-init-fail/source/app.d diff --git a/test/new_tests/0-init-interactive/.gitignore b/test/0-init-interactive/.gitignore similarity index 100% rename from test/new_tests/0-init-interactive/.gitignore rename to test/0-init-interactive/.gitignore diff --git a/test/new_tests/0-init-interactive/dub.sdl b/test/0-init-interactive/dub.sdl similarity index 100% rename from test/new_tests/0-init-interactive/dub.sdl rename to test/0-init-interactive/dub.sdl diff --git a/test/new_tests/0-init-interactive/exp/default_name.dub.sdl b/test/0-init-interactive/exp/default_name.dub.sdl similarity index 100% rename from test/new_tests/0-init-interactive/exp/default_name.dub.sdl rename to test/0-init-interactive/exp/default_name.dub.sdl diff --git a/test/new_tests/0-init-interactive/exp/dub.json b/test/0-init-interactive/exp/dub.json similarity index 100% rename from test/new_tests/0-init-interactive/exp/dub.json rename to test/0-init-interactive/exp/dub.json diff --git a/test/new_tests/0-init-interactive/exp/dub.sdl b/test/0-init-interactive/exp/dub.sdl similarity index 100% rename from test/new_tests/0-init-interactive/exp/dub.sdl rename to test/0-init-interactive/exp/dub.sdl diff --git a/test/new_tests/0-init-interactive/exp/license_gpl3.dub.sdl b/test/0-init-interactive/exp/license_gpl3.dub.sdl similarity index 100% rename from test/new_tests/0-init-interactive/exp/license_gpl3.dub.sdl rename to test/0-init-interactive/exp/license_gpl3.dub.sdl diff --git a/test/new_tests/0-init-interactive/exp/license_mpl2.dub.sdl b/test/0-init-interactive/exp/license_mpl2.dub.sdl similarity index 100% rename from test/new_tests/0-init-interactive/exp/license_mpl2.dub.sdl rename to test/0-init-interactive/exp/license_mpl2.dub.sdl diff --git a/test/new_tests/0-init-interactive/exp/license_proprietary.dub.sdl b/test/0-init-interactive/exp/license_proprietary.dub.sdl similarity index 100% rename from test/new_tests/0-init-interactive/exp/license_proprietary.dub.sdl rename to test/0-init-interactive/exp/license_proprietary.dub.sdl diff --git a/test/new_tests/0-init-interactive/source/app.d b/test/0-init-interactive/source/app.d similarity index 100% rename from test/new_tests/0-init-interactive/source/app.d rename to test/0-init-interactive/source/app.d diff --git a/test/new_tests/0-init-multi-json/dub.sdl b/test/0-init-multi-json/dub.sdl similarity index 100% rename from test/new_tests/0-init-multi-json/dub.sdl rename to test/0-init-multi-json/dub.sdl diff --git a/test/new_tests/0-init-multi-json/source/app.d b/test/0-init-multi-json/source/app.d similarity index 100% rename from test/new_tests/0-init-multi-json/source/app.d rename to test/0-init-multi-json/source/app.d diff --git a/test/new_tests/0-init-multi/dub.sdl b/test/0-init-multi/dub.sdl similarity index 100% rename from test/new_tests/0-init-multi/dub.sdl rename to test/0-init-multi/dub.sdl diff --git a/test/new_tests/0-init-multi/source/app.d b/test/0-init-multi/source/app.d similarity index 100% rename from test/new_tests/0-init-multi/source/app.d rename to test/0-init-multi/source/app.d diff --git a/test/new_tests/0-init-simple-json/dub.sdl b/test/0-init-simple-json/dub.sdl similarity index 100% rename from test/new_tests/0-init-simple-json/dub.sdl rename to test/0-init-simple-json/dub.sdl diff --git a/test/new_tests/0-init-simple-json/source/app.d b/test/0-init-simple-json/source/app.d similarity index 100% rename from test/new_tests/0-init-simple-json/source/app.d rename to test/0-init-simple-json/source/app.d diff --git a/test/new_tests/0-init-simple/dub.sdl b/test/0-init-simple/dub.sdl similarity index 100% rename from test/new_tests/0-init-simple/dub.sdl rename to test/0-init-simple/dub.sdl diff --git a/test/new_tests/0-init-simple/source/app.d b/test/0-init-simple/source/app.d similarity index 100% rename from test/new_tests/0-init-simple/source/app.d rename to test/0-init-simple/source/app.d diff --git a/test/new_tests/1-dynLib-simple/dub.json b/test/1-dynLib-simple/dub.json similarity index 100% rename from test/new_tests/1-dynLib-simple/dub.json rename to test/1-dynLib-simple/dub.json diff --git a/test/new_tests/1-dynLib-simple/source/dynlib/app.d b/test/1-dynLib-simple/source/dynlib/app.d similarity index 100% rename from test/new_tests/1-dynLib-simple/source/dynlib/app.d rename to test/1-dynLib-simple/source/dynlib/app.d diff --git a/test/new_tests/1-dynLib-simple/test.config b/test/1-dynLib-simple/test.config similarity index 100% rename from test/new_tests/1-dynLib-simple/test.config rename to test/1-dynLib-simple/test.config diff --git a/test/new_tests/1-exec-simple-package-json/package.json b/test/1-exec-simple-package-json/package.json similarity index 100% rename from test/new_tests/1-exec-simple-package-json/package.json rename to test/1-exec-simple-package-json/package.json diff --git a/test/new_tests/1-exec-simple-package-json/source/app.d b/test/1-exec-simple-package-json/source/app.d similarity index 100% rename from test/new_tests/1-exec-simple-package-json/source/app.d rename to test/1-exec-simple-package-json/source/app.d diff --git a/test/new_tests/1-exec-simple/dub.json b/test/1-exec-simple/dub.json similarity index 100% rename from test/new_tests/1-exec-simple/dub.json rename to test/1-exec-simple/dub.json diff --git a/test/new_tests/1-exec-simple/source/app.d b/test/1-exec-simple/source/app.d similarity index 100% rename from test/new_tests/1-exec-simple/source/app.d rename to test/1-exec-simple/source/app.d diff --git a/test/new_tests/1-staticLib-simple/dub.json b/test/1-staticLib-simple/dub.json similarity index 100% rename from test/new_tests/1-staticLib-simple/dub.json rename to test/1-staticLib-simple/dub.json diff --git a/test/new_tests/1-staticLib-simple/source/staticlib/app.d b/test/1-staticLib-simple/source/staticlib/app.d similarity index 100% rename from test/new_tests/1-staticLib-simple/source/staticlib/app.d rename to test/1-staticLib-simple/source/staticlib/app.d diff --git a/test/new_tests/1-staticLib-simple/test.config b/test/1-staticLib-simple/test.config similarity index 100% rename from test/new_tests/1-staticLib-simple/test.config rename to test/1-staticLib-simple/test.config diff --git a/test/new_tests/2-dynLib-dep/dub.json b/test/2-dynLib-dep/dub.json similarity index 100% rename from test/new_tests/2-dynLib-dep/dub.json rename to test/2-dynLib-dep/dub.json diff --git a/test/new_tests/2-dynLib-dep/source/app.d b/test/2-dynLib-dep/source/app.d similarity index 100% rename from test/new_tests/2-dynLib-dep/source/app.d rename to test/2-dynLib-dep/source/app.d diff --git a/test/new_tests/2-dynLib-dep/test.config b/test/2-dynLib-dep/test.config similarity index 100% rename from test/new_tests/2-dynLib-dep/test.config rename to test/2-dynLib-dep/test.config diff --git a/test/new_tests/2-dynLib-with-staticLib-dep/dub.json b/test/2-dynLib-with-staticLib-dep/dub.json similarity index 100% rename from test/new_tests/2-dynLib-with-staticLib-dep/dub.json rename to test/2-dynLib-with-staticLib-dep/dub.json diff --git a/test/new_tests/2-dynLib-with-staticLib-dep/source/dynlib/app.d b/test/2-dynLib-with-staticLib-dep/source/dynlib/app.d similarity index 100% rename from test/new_tests/2-dynLib-with-staticLib-dep/source/dynlib/app.d rename to test/2-dynLib-with-staticLib-dep/source/dynlib/app.d diff --git a/test/new_tests/2-dynLib-with-staticLib-dep/test.config b/test/2-dynLib-with-staticLib-dep/test.config similarity index 100% rename from test/new_tests/2-dynLib-with-staticLib-dep/test.config rename to test/2-dynLib-with-staticLib-dep/test.config diff --git a/test/new_tests/2-sourceLib-dep/dub.json b/test/2-sourceLib-dep/dub.json similarity index 100% rename from test/new_tests/2-sourceLib-dep/dub.json rename to test/2-sourceLib-dep/dub.json diff --git a/test/new_tests/2-sourceLib-dep/source/app.d b/test/2-sourceLib-dep/source/app.d similarity index 100% rename from test/new_tests/2-sourceLib-dep/source/app.d rename to test/2-sourceLib-dep/source/app.d diff --git a/test/new_tests/2-staticLib-dep/dub.json b/test/2-staticLib-dep/dub.json similarity index 100% rename from test/new_tests/2-staticLib-dep/dub.json rename to test/2-staticLib-dep/dub.json diff --git a/test/new_tests/2-staticLib-dep/source/app.d b/test/2-staticLib-dep/source/app.d similarity index 100% rename from test/new_tests/2-staticLib-dep/source/app.d rename to test/2-staticLib-dep/source/app.d diff --git a/test/new_tests/2-staticLib-dep/test.config b/test/2-staticLib-dep/test.config similarity index 100% rename from test/new_tests/2-staticLib-dep/test.config rename to test/2-staticLib-dep/test.config diff --git a/test/new_tests/3-copyFiles/.gitignore b/test/3-copyFiles/.gitignore similarity index 100% rename from test/new_tests/3-copyFiles/.gitignore rename to test/3-copyFiles/.gitignore diff --git a/test/new_tests/3-copyFiles/data/file_to_copy.txt b/test/3-copyFiles/data/file_to_copy.txt similarity index 100% rename from test/new_tests/3-copyFiles/data/file_to_copy.txt rename to test/3-copyFiles/data/file_to_copy.txt diff --git a/test/new_tests/3-copyFiles/data/file_to_copy_mask1.txt b/test/3-copyFiles/data/file_to_copy_mask1.txt similarity index 100% rename from test/new_tests/3-copyFiles/data/file_to_copy_mask1.txt rename to test/3-copyFiles/data/file_to_copy_mask1.txt diff --git a/test/new_tests/3-copyFiles/data/file_to_copy_mask2.txt b/test/3-copyFiles/data/file_to_copy_mask2.txt similarity index 100% rename from test/new_tests/3-copyFiles/data/file_to_copy_mask2.txt rename to test/3-copyFiles/data/file_to_copy_mask2.txt diff --git a/test/new_tests/3-copyFiles/data/res/.nocopy/file_inside_dot_prefixed_dir.txt b/test/3-copyFiles/data/res/.nocopy/file_inside_dot_prefixed_dir.txt similarity index 100% rename from test/new_tests/3-copyFiles/data/res/.nocopy/file_inside_dot_prefixed_dir.txt rename to test/3-copyFiles/data/res/.nocopy/file_inside_dot_prefixed_dir.txt diff --git a/test/new_tests/3-copyFiles/data/res/hdpi/file1.txt b/test/3-copyFiles/data/res/hdpi/file1.txt similarity index 100% rename from test/new_tests/3-copyFiles/data/res/hdpi/file1.txt rename to test/3-copyFiles/data/res/hdpi/file1.txt diff --git a/test/new_tests/3-copyFiles/data/res/hdpi/file2.txt b/test/3-copyFiles/data/res/hdpi/file2.txt similarity index 100% rename from test/new_tests/3-copyFiles/data/res/hdpi/file2.txt rename to test/3-copyFiles/data/res/hdpi/file2.txt diff --git a/test/new_tests/3-copyFiles/data/res/hdpi/file3.txt b/test/3-copyFiles/data/res/hdpi/file3.txt similarity index 100% rename from test/new_tests/3-copyFiles/data/res/hdpi/file3.txt rename to test/3-copyFiles/data/res/hdpi/file3.txt diff --git a/test/new_tests/3-copyFiles/data/res/hdpi/nested_dir/nested_file.txt b/test/3-copyFiles/data/res/hdpi/nested_dir/nested_file.txt similarity index 100% rename from test/new_tests/3-copyFiles/data/res/hdpi/nested_dir/nested_file.txt rename to test/3-copyFiles/data/res/hdpi/nested_dir/nested_file.txt diff --git a/test/new_tests/3-copyFiles/data/res/i18n/resource_en.txt b/test/3-copyFiles/data/res/i18n/resource_en.txt similarity index 100% rename from test/new_tests/3-copyFiles/data/res/i18n/resource_en.txt rename to test/3-copyFiles/data/res/i18n/resource_en.txt diff --git a/test/new_tests/3-copyFiles/data/res/i18n/resource_fr.txt b/test/3-copyFiles/data/res/i18n/resource_fr.txt similarity index 100% rename from test/new_tests/3-copyFiles/data/res/i18n/resource_fr.txt rename to test/3-copyFiles/data/res/i18n/resource_fr.txt diff --git a/test/new_tests/3-copyFiles/data/res/ldpi/file1.txt b/test/3-copyFiles/data/res/ldpi/file1.txt similarity index 100% rename from test/new_tests/3-copyFiles/data/res/ldpi/file1.txt rename to test/3-copyFiles/data/res/ldpi/file1.txt diff --git a/test/new_tests/3-copyFiles/data/res/ldpi/file2.txt b/test/3-copyFiles/data/res/ldpi/file2.txt similarity index 100% rename from test/new_tests/3-copyFiles/data/res/ldpi/file2.txt rename to test/3-copyFiles/data/res/ldpi/file2.txt diff --git a/test/new_tests/3-copyFiles/data/res/ldpi/file3.txt b/test/3-copyFiles/data/res/ldpi/file3.txt similarity index 100% rename from test/new_tests/3-copyFiles/data/res/ldpi/file3.txt rename to test/3-copyFiles/data/res/ldpi/file3.txt diff --git a/test/new_tests/3-copyFiles/data/res/mdpi/file1.txt b/test/3-copyFiles/data/res/mdpi/file1.txt similarity index 100% rename from test/new_tests/3-copyFiles/data/res/mdpi/file1.txt rename to test/3-copyFiles/data/res/mdpi/file1.txt diff --git a/test/new_tests/3-copyFiles/data/res/mdpi/file2.txt b/test/3-copyFiles/data/res/mdpi/file2.txt similarity index 100% rename from test/new_tests/3-copyFiles/data/res/mdpi/file2.txt rename to test/3-copyFiles/data/res/mdpi/file2.txt diff --git a/test/new_tests/3-copyFiles/data/res/mdpi/file3.txt b/test/3-copyFiles/data/res/mdpi/file3.txt similarity index 100% rename from test/new_tests/3-copyFiles/data/res/mdpi/file3.txt rename to test/3-copyFiles/data/res/mdpi/file3.txt diff --git a/test/new_tests/3-copyFiles/dub.json b/test/3-copyFiles/dub.json similarity index 100% rename from test/new_tests/3-copyFiles/dub.json rename to test/3-copyFiles/dub.json diff --git a/test/new_tests/3-copyFiles/source/app.d b/test/3-copyFiles/source/app.d similarity index 100% rename from test/new_tests/3-copyFiles/source/app.d rename to test/3-copyFiles/source/app.d diff --git a/test/new_tests/4-describe-data-1-list/dub.json b/test/4-describe-data-1-list/dub.json similarity index 100% rename from test/new_tests/4-describe-data-1-list/dub.json rename to test/4-describe-data-1-list/dub.json diff --git a/test/new_tests/4-describe-data-1-list/source/app.d b/test/4-describe-data-1-list/source/app.d similarity index 100% rename from test/new_tests/4-describe-data-1-list/source/app.d rename to test/4-describe-data-1-list/source/app.d diff --git a/test/new_tests/4-describe-data-1-list/test.config b/test/4-describe-data-1-list/test.config similarity index 100% rename from test/new_tests/4-describe-data-1-list/test.config rename to test/4-describe-data-1-list/test.config diff --git a/test/new_tests/4-describe-data-2-dmd/dub.json b/test/4-describe-data-2-dmd/dub.json similarity index 100% rename from test/new_tests/4-describe-data-2-dmd/dub.json rename to test/4-describe-data-2-dmd/dub.json diff --git a/test/new_tests/4-describe-data-2-dmd/source/app.d b/test/4-describe-data-2-dmd/source/app.d similarity index 100% rename from test/new_tests/4-describe-data-2-dmd/source/app.d rename to test/4-describe-data-2-dmd/source/app.d diff --git a/test/new_tests/4-describe-data-2-dmd/test.config b/test/4-describe-data-2-dmd/test.config similarity index 100% rename from test/new_tests/4-describe-data-2-dmd/test.config rename to test/4-describe-data-2-dmd/test.config diff --git a/test/new_tests/4-describe-data-3-zero-delim/dub.json b/test/4-describe-data-3-zero-delim/dub.json similarity index 100% rename from test/new_tests/4-describe-data-3-zero-delim/dub.json rename to test/4-describe-data-3-zero-delim/dub.json diff --git a/test/new_tests/4-describe-data-3-zero-delim/source/app.d b/test/4-describe-data-3-zero-delim/source/app.d similarity index 100% rename from test/new_tests/4-describe-data-3-zero-delim/source/app.d rename to test/4-describe-data-3-zero-delim/source/app.d diff --git a/test/new_tests/4-describe-data-3-zero-delim/test.config b/test/4-describe-data-3-zero-delim/test.config similarity index 100% rename from test/new_tests/4-describe-data-3-zero-delim/test.config rename to test/4-describe-data-3-zero-delim/test.config diff --git a/test/new_tests/4-describe-import-paths/dub.json b/test/4-describe-import-paths/dub.json similarity index 100% rename from test/new_tests/4-describe-import-paths/dub.json rename to test/4-describe-import-paths/dub.json diff --git a/test/new_tests/4-describe-import-paths/source/app.d b/test/4-describe-import-paths/source/app.d similarity index 100% rename from test/new_tests/4-describe-import-paths/source/app.d rename to test/4-describe-import-paths/source/app.d diff --git a/test/new_tests/4-describe-import-paths/test.config b/test/4-describe-import-paths/test.config similarity index 100% rename from test/new_tests/4-describe-import-paths/test.config rename to test/4-describe-import-paths/test.config diff --git a/test/new_tests/4-describe-json/dub.json b/test/4-describe-json/dub.json similarity index 100% rename from test/new_tests/4-describe-json/dub.json rename to test/4-describe-json/dub.json diff --git a/test/new_tests/4-describe-json/source/app.d b/test/4-describe-json/source/app.d similarity index 100% rename from test/new_tests/4-describe-json/source/app.d rename to test/4-describe-json/source/app.d diff --git a/test/new_tests/4-describe-json/test.config b/test/4-describe-json/test.config similarity index 100% rename from test/new_tests/4-describe-json/test.config rename to test/4-describe-json/test.config diff --git a/test/new_tests/4-describe-string-import-paths/dub.json b/test/4-describe-string-import-paths/dub.json similarity index 100% rename from test/new_tests/4-describe-string-import-paths/dub.json rename to test/4-describe-string-import-paths/dub.json diff --git a/test/new_tests/4-describe-string-import-paths/source/app.d b/test/4-describe-string-import-paths/source/app.d similarity index 100% rename from test/new_tests/4-describe-string-import-paths/source/app.d rename to test/4-describe-string-import-paths/source/app.d diff --git a/test/new_tests/4-describe-string-import-paths/test.config b/test/4-describe-string-import-paths/test.config similarity index 100% rename from test/new_tests/4-describe-string-import-paths/test.config rename to test/4-describe-string-import-paths/test.config diff --git a/test/new_tests/5-convert-stdout/.gitignore b/test/5-convert-stdout/.gitignore similarity index 100% rename from test/new_tests/5-convert-stdout/.gitignore rename to test/5-convert-stdout/.gitignore diff --git a/test/new_tests/5-convert-stdout/dub.json b/test/5-convert-stdout/dub.json similarity index 100% rename from test/new_tests/5-convert-stdout/dub.json rename to test/5-convert-stdout/dub.json diff --git a/test/new_tests/5-convert-stdout/sample/dub.json b/test/5-convert-stdout/sample/dub.json similarity index 100% rename from test/new_tests/5-convert-stdout/sample/dub.json rename to test/5-convert-stdout/sample/dub.json diff --git a/test/new_tests/5-convert-stdout/source/app.d b/test/5-convert-stdout/source/app.d similarity index 100% rename from test/new_tests/5-convert-stdout/source/app.d rename to test/5-convert-stdout/source/app.d diff --git a/test/new_tests/5-convert/.gitignore b/test/5-convert/.gitignore similarity index 100% rename from test/new_tests/5-convert/.gitignore rename to test/5-convert/.gitignore diff --git a/test/new_tests/5-convert/dub.json b/test/5-convert/dub.json similarity index 100% rename from test/new_tests/5-convert/dub.json rename to test/5-convert/dub.json diff --git a/test/new_tests/5-convert/sample/dub.sdl b/test/5-convert/sample/dub.sdl similarity index 100% rename from test/new_tests/5-convert/sample/dub.sdl rename to test/5-convert/sample/dub.sdl diff --git a/test/new_tests/5-convert/source/app.d b/test/5-convert/source/app.d similarity index 100% rename from test/new_tests/5-convert/source/app.d rename to test/5-convert/source/app.d diff --git a/test/new_tests/README.md b/test/README.md similarity index 100% rename from test/new_tests/README.md rename to test/README.md diff --git a/test/new_tests/cache-generated-test-config/.gitignore b/test/cache-generated-test-config/.gitignore similarity index 100% rename from test/new_tests/cache-generated-test-config/.gitignore rename to test/cache-generated-test-config/.gitignore diff --git a/test/new_tests/cache-generated-test-config/dub.json b/test/cache-generated-test-config/dub.json similarity index 100% rename from test/new_tests/cache-generated-test-config/dub.json rename to test/cache-generated-test-config/dub.json diff --git a/test/new_tests/cache-generated-test-config/sample/dub.sdl b/test/cache-generated-test-config/sample/dub.sdl similarity index 100% rename from test/new_tests/cache-generated-test-config/sample/dub.sdl rename to test/cache-generated-test-config/sample/dub.sdl diff --git a/test/new_tests/cache-generated-test-config/sample/source/test.d b/test/cache-generated-test-config/sample/source/test.d similarity index 100% rename from test/new_tests/cache-generated-test-config/sample/source/test.d rename to test/cache-generated-test-config/sample/source/test.d diff --git a/test/new_tests/cache-generated-test-config/source/app.d b/test/cache-generated-test-config/source/app.d similarity index 100% rename from test/new_tests/cache-generated-test-config/source/app.d rename to test/cache-generated-test-config/source/app.d diff --git a/test/new_tests/colored-output/.gitignore b/test/colored-output/.gitignore similarity index 100% rename from test/new_tests/colored-output/.gitignore rename to test/colored-output/.gitignore diff --git a/test/new_tests/colored-output/dub.json b/test/colored-output/dub.json similarity index 100% rename from test/new_tests/colored-output/dub.json rename to test/colored-output/dub.json diff --git a/test/new_tests/colored-output/sample/dub.sdl b/test/colored-output/sample/dub.sdl similarity index 100% rename from test/new_tests/colored-output/sample/dub.sdl rename to test/colored-output/sample/dub.sdl diff --git a/test/new_tests/colored-output/sample/source/lib.d b/test/colored-output/sample/source/lib.d similarity index 100% rename from test/new_tests/colored-output/sample/source/lib.d rename to test/colored-output/sample/source/lib.d diff --git a/test/new_tests/colored-output/source/app.d b/test/colored-output/source/app.d similarity index 100% rename from test/new_tests/colored-output/source/app.d rename to test/colored-output/source/app.d diff --git a/test/new_tests/colored-output/test.config b/test/colored-output/test.config similarity index 100% rename from test/new_tests/colored-output/test.config rename to test/colored-output/test.config diff --git a/test/new_tests/common/dub.json b/test/common/dub.json similarity index 100% rename from test/new_tests/common/dub.json rename to test/common/dub.json diff --git a/test/new_tests/common/source/common.d b/test/common/source/common.d similarity index 100% rename from test/new_tests/common/source/common.d rename to test/common/source/common.d diff --git a/test/new_tests/cov-ctfe/.gitignore b/test/cov-ctfe/.gitignore similarity index 100% rename from test/new_tests/cov-ctfe/.gitignore rename to test/cov-ctfe/.gitignore diff --git a/test/new_tests/cov-ctfe/dub.sdl b/test/cov-ctfe/dub.sdl similarity index 100% rename from test/new_tests/cov-ctfe/dub.sdl rename to test/cov-ctfe/dub.sdl diff --git a/test/new_tests/cov-ctfe/test.config b/test/cov-ctfe/test.config similarity index 100% rename from test/new_tests/cov-ctfe/test.config rename to test/cov-ctfe/test.config diff --git a/test/new_tests/cov-ctfe/test.d b/test/cov-ctfe/test.d similarity index 100% rename from test/new_tests/cov-ctfe/test.d rename to test/cov-ctfe/test.d diff --git a/test/new_tests/custom-source-main-bug487/.gitignore b/test/custom-source-main-bug487/.gitignore similarity index 100% rename from test/new_tests/custom-source-main-bug487/.gitignore rename to test/custom-source-main-bug487/.gitignore diff --git a/test/new_tests/custom-source-main-bug487/dub.json b/test/custom-source-main-bug487/dub.json similarity index 100% rename from test/new_tests/custom-source-main-bug487/dub.json rename to test/custom-source-main-bug487/dub.json diff --git a/test/new_tests/custom-source-main-bug487/mysrc/app.d b/test/custom-source-main-bug487/mysrc/app.d similarity index 100% rename from test/new_tests/custom-source-main-bug487/mysrc/app.d rename to test/custom-source-main-bug487/mysrc/app.d diff --git a/test/new_tests/custom-source-main-bug487/test.config b/test/custom-source-main-bug487/test.config similarity index 100% rename from test/new_tests/custom-source-main-bug487/test.config rename to test/custom-source-main-bug487/test.config diff --git a/test/new_tests/custom-unittest/.gitignore b/test/custom-unittest/.gitignore similarity index 100% rename from test/new_tests/custom-unittest/.gitignore rename to test/custom-unittest/.gitignore diff --git a/test/new_tests/custom-unittest/dub.json b/test/custom-unittest/dub.json similarity index 100% rename from test/new_tests/custom-unittest/dub.json rename to test/custom-unittest/dub.json diff --git a/test/new_tests/custom-unittest/source/app.d b/test/custom-unittest/source/app.d similarity index 100% rename from test/new_tests/custom-unittest/source/app.d rename to test/custom-unittest/source/app.d diff --git a/test/new_tests/custom-unittest/source/lib.d b/test/custom-unittest/source/lib.d similarity index 100% rename from test/new_tests/custom-unittest/source/lib.d rename to test/custom-unittest/source/lib.d diff --git a/test/new_tests/custom-unittest/test.config b/test/custom-unittest/test.config similarity index 100% rename from test/new_tests/custom-unittest/test.config rename to test/custom-unittest/test.config diff --git a/test/new_tests/custom-unittest/test/main.d b/test/custom-unittest/test/main.d similarity index 100% rename from test/new_tests/custom-unittest/test/main.d rename to test/custom-unittest/test/main.d diff --git a/test/new_tests/d-versions/.gitignore b/test/d-versions/.gitignore similarity index 100% rename from test/new_tests/d-versions/.gitignore rename to test/d-versions/.gitignore diff --git a/test/new_tests/d-versions/dub.json b/test/d-versions/dub.json similarity index 100% rename from test/new_tests/d-versions/dub.json rename to test/d-versions/dub.json diff --git a/test/new_tests/d-versions/sample/dub.sdl b/test/d-versions/sample/dub.sdl similarity index 100% rename from test/new_tests/d-versions/sample/dub.sdl rename to test/d-versions/sample/dub.sdl diff --git a/test/new_tests/d-versions/sample/source/app.d b/test/d-versions/sample/source/app.d similarity index 100% rename from test/new_tests/d-versions/sample/source/app.d rename to test/d-versions/sample/source/app.d diff --git a/test/new_tests/d-versions/source/app.d b/test/d-versions/source/app.d similarity index 100% rename from test/new_tests/d-versions/source/app.d rename to test/d-versions/source/app.d diff --git a/test/new_tests/ddox/.gitignore b/test/ddox/.gitignore similarity index 100% rename from test/new_tests/ddox/.gitignore rename to test/ddox/.gitignore diff --git a/test/new_tests/ddox/custom-tool/dub.sdl b/test/ddox/custom-tool/dub.sdl similarity index 100% rename from test/new_tests/ddox/custom-tool/dub.sdl rename to test/ddox/custom-tool/dub.sdl diff --git a/test/new_tests/ddox/custom-tool/public/copied b/test/ddox/custom-tool/public/copied similarity index 100% rename from test/new_tests/ddox/custom-tool/public/copied rename to test/ddox/custom-tool/public/copied diff --git a/test/new_tests/ddox/custom-tool/source/app.d b/test/ddox/custom-tool/source/app.d similarity index 100% rename from test/new_tests/ddox/custom-tool/source/app.d rename to test/ddox/custom-tool/source/app.d diff --git a/test/new_tests/ddox/custom/dub.sdl b/test/ddox/custom/dub.sdl similarity index 100% rename from test/new_tests/ddox/custom/dub.sdl rename to test/ddox/custom/dub.sdl diff --git a/test/new_tests/ddox/custom/source/ddox_project.d b/test/ddox/custom/source/ddox_project.d similarity index 100% rename from test/new_tests/ddox/custom/source/ddox_project.d rename to test/ddox/custom/source/ddox_project.d diff --git a/test/new_tests/ddox/default/dub.sdl b/test/ddox/default/dub.sdl similarity index 100% rename from test/new_tests/ddox/default/dub.sdl rename to test/ddox/default/dub.sdl diff --git a/test/new_tests/ddox/default/source/ddox_project.d b/test/ddox/default/source/ddox_project.d similarity index 100% rename from test/new_tests/ddox/default/source/ddox_project.d rename to test/ddox/default/source/ddox_project.d diff --git a/test/new_tests/ddox/dub.json b/test/ddox/dub.json similarity index 100% rename from test/new_tests/ddox/dub.json rename to test/ddox/dub.json diff --git a/test/new_tests/ddox/source/app.d b/test/ddox/source/app.d similarity index 100% rename from test/new_tests/ddox/source/app.d rename to test/ddox/source/app.d diff --git a/test/new_tests/depen-build-settings/.gitignore b/test/depen-build-settings/.gitignore similarity index 100% rename from test/new_tests/depen-build-settings/.gitignore rename to test/depen-build-settings/.gitignore diff --git a/test/new_tests/depen-build-settings/depend/depend2/dub.json b/test/depen-build-settings/depend/depend2/dub.json similarity index 100% rename from test/new_tests/depen-build-settings/depend/depend2/dub.json rename to test/depen-build-settings/depend/depend2/dub.json diff --git a/test/new_tests/depen-build-settings/depend/depend2/source/depend2.d b/test/depen-build-settings/depend/depend2/source/depend2.d similarity index 100% rename from test/new_tests/depen-build-settings/depend/depend2/source/depend2.d rename to test/depen-build-settings/depend/depend2/source/depend2.d diff --git a/test/new_tests/depen-build-settings/depend/dub.json b/test/depen-build-settings/depend/dub.json similarity index 100% rename from test/new_tests/depen-build-settings/depend/dub.json rename to test/depen-build-settings/depend/dub.json diff --git a/test/new_tests/depen-build-settings/depend/source/depend.d b/test/depen-build-settings/depend/source/depend.d similarity index 100% rename from test/new_tests/depen-build-settings/depend/source/depend.d rename to test/depen-build-settings/depend/source/depend.d diff --git a/test/new_tests/depen-build-settings/dub.json b/test/depen-build-settings/dub.json similarity index 100% rename from test/new_tests/depen-build-settings/dub.json rename to test/depen-build-settings/dub.json diff --git a/test/new_tests/depen-build-settings/dub.selections.json b/test/depen-build-settings/dub.selections.json similarity index 100% rename from test/new_tests/depen-build-settings/dub.selections.json rename to test/depen-build-settings/dub.selections.json diff --git a/test/new_tests/depen-build-settings/source/app.d b/test/depen-build-settings/source/app.d similarity index 100% rename from test/new_tests/depen-build-settings/source/app.d rename to test/depen-build-settings/source/app.d diff --git a/test/new_tests/depen-build-settings/test.config b/test/depen-build-settings/test.config similarity index 100% rename from test/new_tests/depen-build-settings/test.config rename to test/depen-build-settings/test.config diff --git a/test/new_tests/dest-directory/.gitignore b/test/dest-directory/.gitignore similarity index 100% rename from test/new_tests/dest-directory/.gitignore rename to test/dest-directory/.gitignore diff --git a/test/new_tests/dest-directory/dub.json b/test/dest-directory/dub.json similarity index 100% rename from test/new_tests/dest-directory/dub.json rename to test/dest-directory/dub.json diff --git a/test/new_tests/dest-directory/sample/dub.sdl b/test/dest-directory/sample/dub.sdl similarity index 100% rename from test/new_tests/dest-directory/sample/dub.sdl rename to test/dest-directory/sample/dub.sdl diff --git a/test/new_tests/dest-directory/sample/source/app.d b/test/dest-directory/sample/source/app.d similarity index 100% rename from test/new_tests/dest-directory/sample/source/app.d rename to test/dest-directory/sample/source/app.d diff --git a/test/new_tests/dest-directory/source/app.d b/test/dest-directory/source/app.d similarity index 100% rename from test/new_tests/dest-directory/source/app.d rename to test/dest-directory/source/app.d diff --git a/test/new_tests/dpath-variable/.gitignore b/test/dpath-variable/.gitignore similarity index 100% rename from test/new_tests/dpath-variable/.gitignore rename to test/dpath-variable/.gitignore diff --git a/test/new_tests/dpath-variable/dub.json b/test/dpath-variable/dub.json similarity index 100% rename from test/new_tests/dpath-variable/dub.json rename to test/dpath-variable/dub.json diff --git a/test/new_tests/dpath-variable/sample/dub.json b/test/dpath-variable/sample/dub.json similarity index 100% rename from test/new_tests/dpath-variable/sample/dub.json rename to test/dpath-variable/sample/dub.json diff --git a/test/new_tests/dpath-variable/sample/source/app.d b/test/dpath-variable/sample/source/app.d similarity index 100% rename from test/new_tests/dpath-variable/sample/source/app.d rename to test/dpath-variable/sample/source/app.d diff --git a/test/new_tests/dpath-variable/source/app.d b/test/dpath-variable/source/app.d similarity index 100% rename from test/new_tests/dpath-variable/source/app.d rename to test/dpath-variable/source/app.d diff --git a/test/new_tests/dub-as-a-library-cwd/.gitignore b/test/dub-as-a-library-cwd/.gitignore similarity index 100% rename from test/new_tests/dub-as-a-library-cwd/.gitignore rename to test/dub-as-a-library-cwd/.gitignore diff --git a/test/new_tests/dub-as-a-library-cwd/dub.json b/test/dub-as-a-library-cwd/dub.json similarity index 100% rename from test/new_tests/dub-as-a-library-cwd/dub.json rename to test/dub-as-a-library-cwd/dub.json diff --git a/test/new_tests/dub-as-a-library-cwd/sample/dub.json b/test/dub-as-a-library-cwd/sample/dub.json similarity index 79% rename from test/new_tests/dub-as-a-library-cwd/sample/dub.json rename to test/dub-as-a-library-cwd/sample/dub.json index 074e415736..cb49357c6b 100644 --- a/test/new_tests/dub-as-a-library-cwd/sample/dub.json +++ b/test/dub-as-a-library-cwd/sample/dub.json @@ -3,7 +3,7 @@ "workingDirectory": ".", "dependencies": { "dub": { - "path": "../../../../" + "path": "../../../" } } } diff --git a/test/new_tests/dub-as-a-library-cwd/sample/source/app.d b/test/dub-as-a-library-cwd/sample/source/app.d similarity index 100% rename from test/new_tests/dub-as-a-library-cwd/sample/source/app.d rename to test/dub-as-a-library-cwd/sample/source/app.d diff --git a/test/new_tests/dub-as-a-library-cwd/sample/subproject/dub.sdl b/test/dub-as-a-library-cwd/sample/subproject/dub.sdl similarity index 100% rename from test/new_tests/dub-as-a-library-cwd/sample/subproject/dub.sdl rename to test/dub-as-a-library-cwd/sample/subproject/dub.sdl diff --git a/test/new_tests/dub-as-a-library-cwd/sample/subproject/source/app.d b/test/dub-as-a-library-cwd/sample/subproject/source/app.d similarity index 100% rename from test/new_tests/dub-as-a-library-cwd/sample/subproject/source/app.d rename to test/dub-as-a-library-cwd/sample/subproject/source/app.d diff --git a/test/new_tests/dub-as-a-library-cwd/source/app.d b/test/dub-as-a-library-cwd/source/app.d similarity index 100% rename from test/new_tests/dub-as-a-library-cwd/source/app.d rename to test/dub-as-a-library-cwd/source/app.d diff --git a/test/new_tests/dub-custom-root/.gitignore b/test/dub-custom-root/.gitignore similarity index 100% rename from test/new_tests/dub-custom-root/.gitignore rename to test/dub-custom-root/.gitignore diff --git a/test/new_tests/dub-custom-root/custom-root-2/dub.json b/test/dub-custom-root/custom-root-2/dub.json similarity index 100% rename from test/new_tests/dub-custom-root/custom-root-2/dub.json rename to test/dub-custom-root/custom-root-2/dub.json diff --git a/test/new_tests/dub-custom-root/custom-root-2/source/app.d b/test/dub-custom-root/custom-root-2/source/app.d similarity index 64% rename from test/new_tests/dub-custom-root/custom-root-2/source/app.d rename to test/dub-custom-root/custom-root-2/source/app.d index e625b6de3c..531fa164ea 100644 --- a/test/new_tests/dub-custom-root/custom-root-2/source/app.d +++ b/test/dub-custom-root/custom-root-2/source/app.d @@ -7,7 +7,6 @@ void main() { // run me from test/dub-custom-root with dub --root=custom-root-2 string cwd = getcwd; - immutable expected = buildPath("new_tests", "dub-custom-root", "custom-root-2", "source"); - // TODO: new_tests => test + immutable expected = buildPath("test", "dub-custom-root", "custom-root-2", "source"); assert(cwd.endsWith(expected), cwd); } diff --git a/test/new_tests/dub-custom-root/custom-root/dub.json b/test/dub-custom-root/custom-root/dub.json similarity index 100% rename from test/new_tests/dub-custom-root/custom-root/dub.json rename to test/dub-custom-root/custom-root/dub.json diff --git a/test/new_tests/dub-custom-root/custom-root/source/app.d b/test/dub-custom-root/custom-root/source/app.d similarity index 86% rename from test/new_tests/dub-custom-root/custom-root/source/app.d rename to test/dub-custom-root/custom-root/source/app.d index e2ed7abccd..2c2eb4f7d7 100644 --- a/test/new_tests/dub-custom-root/custom-root/source/app.d +++ b/test/dub-custom-root/custom-root/source/app.d @@ -5,6 +5,5 @@ import std.stdio; void main() { // run me from test/dub-custom-root with dub --root=custom-root - // TODO: new_tests => tests assert(getcwd.baseName == "dub-custom-root", getcwd); } diff --git a/test/new_tests/dub-custom-root/dub.json b/test/dub-custom-root/dub.json similarity index 100% rename from test/new_tests/dub-custom-root/dub.json rename to test/dub-custom-root/dub.json diff --git a/test/new_tests/dub-custom-root/source/app.d b/test/dub-custom-root/source/app.d similarity index 100% rename from test/new_tests/dub-custom-root/source/app.d rename to test/dub-custom-root/source/app.d diff --git a/test/new_tests/dub_test_root/dub.json b/test/dub_test_root/dub.json similarity index 100% rename from test/new_tests/dub_test_root/dub.json rename to test/dub_test_root/dub.json diff --git a/test/new_tests/dub_test_root/source/app.d b/test/dub_test_root/source/app.d similarity index 100% rename from test/new_tests/dub_test_root/source/app.d rename to test/dub_test_root/source/app.d diff --git a/test/new_tests/dustmite-no-redirect/.gitignore b/test/dustmite-no-redirect/.gitignore similarity index 100% rename from test/new_tests/dustmite-no-redirect/.gitignore rename to test/dustmite-no-redirect/.gitignore diff --git a/test/new_tests/dustmite-no-redirect/dub.json b/test/dustmite-no-redirect/dub.json similarity index 100% rename from test/new_tests/dustmite-no-redirect/dub.json rename to test/dustmite-no-redirect/dub.json diff --git a/test/new_tests/dustmite-no-redirect/sample/dub.json b/test/dustmite-no-redirect/sample/dub.json similarity index 100% rename from test/new_tests/dustmite-no-redirect/sample/dub.json rename to test/dustmite-no-redirect/sample/dub.json diff --git a/test/new_tests/dustmite-no-redirect/sample/source/app.d b/test/dustmite-no-redirect/sample/source/app.d similarity index 100% rename from test/new_tests/dustmite-no-redirect/sample/source/app.d rename to test/dustmite-no-redirect/sample/source/app.d diff --git a/test/new_tests/dustmite-no-redirect/source/app.d b/test/dustmite-no-redirect/source/app.d similarity index 100% rename from test/new_tests/dustmite-no-redirect/source/app.d rename to test/dustmite-no-redirect/source/app.d diff --git a/test/new_tests/environment-variables/.gitignore b/test/environment-variables/.gitignore similarity index 100% rename from test/new_tests/environment-variables/.gitignore rename to test/environment-variables/.gitignore diff --git a/test/new_tests/environment-variables/dub.json b/test/environment-variables/dub.json similarity index 100% rename from test/new_tests/environment-variables/dub.json rename to test/environment-variables/dub.json diff --git a/test/new_tests/environment-variables/sample/deppkg/dub.json b/test/environment-variables/sample/deppkg/dub.json similarity index 100% rename from test/new_tests/environment-variables/sample/deppkg/dub.json rename to test/environment-variables/sample/deppkg/dub.json diff --git a/test/new_tests/environment-variables/sample/deppkg/source/deppkg/foo.d b/test/environment-variables/sample/deppkg/source/deppkg/foo.d similarity index 100% rename from test/new_tests/environment-variables/sample/deppkg/source/deppkg/foo.d rename to test/environment-variables/sample/deppkg/source/deppkg/foo.d diff --git a/test/new_tests/environment-variables/sample/dub.json b/test/environment-variables/sample/dub.json similarity index 100% rename from test/new_tests/environment-variables/sample/dub.json rename to test/environment-variables/sample/dub.json diff --git a/test/new_tests/environment-variables/sample/dub.settings.json b/test/environment-variables/sample/dub.settings.json similarity index 100% rename from test/new_tests/environment-variables/sample/dub.settings.json rename to test/environment-variables/sample/dub.settings.json diff --git a/test/new_tests/environment-variables/sample/source/app.d b/test/environment-variables/sample/source/app.d similarity index 100% rename from test/new_tests/environment-variables/sample/source/app.d rename to test/environment-variables/sample/source/app.d diff --git a/test/new_tests/environment-variables/source/app.d b/test/environment-variables/source/app.d similarity index 100% rename from test/new_tests/environment-variables/source/app.d rename to test/environment-variables/source/app.d diff --git a/test/new_tests/extra/.gitignore b/test/extra/.gitignore similarity index 100% rename from test/new_tests/extra/.gitignore rename to test/extra/.gitignore diff --git a/test/new_tests/extra/1-sourceLib-simple/dub.json b/test/extra/1-sourceLib-simple/dub.json similarity index 100% rename from test/new_tests/extra/1-sourceLib-simple/dub.json rename to test/extra/1-sourceLib-simple/dub.json diff --git a/test/new_tests/extra/1-sourceLib-simple/source/sourcelib/app.d b/test/extra/1-sourceLib-simple/source/sourcelib/app.d similarity index 100% rename from test/new_tests/extra/1-sourceLib-simple/source/sourcelib/app.d rename to test/extra/1-sourceLib-simple/source/sourcelib/app.d diff --git a/test/new_tests/extra/4-describe/.gitignore b/test/extra/4-describe/.gitignore similarity index 100% rename from test/new_tests/extra/4-describe/.gitignore rename to test/extra/4-describe/.gitignore diff --git a/test/new_tests/extra/4-describe/dependency-1/data/dummy-dep1.dat b/test/extra/4-describe/dependency-1/data/dummy-dep1.dat similarity index 100% rename from test/new_tests/extra/4-describe/dependency-1/data/dummy-dep1.dat rename to test/extra/4-describe/dependency-1/data/dummy-dep1.dat diff --git a/test/new_tests/extra/4-describe/dependency-1/dependency-postGenerateCommands.sh b/test/extra/4-describe/dependency-1/dependency-postGenerateCommands.sh similarity index 100% rename from test/new_tests/extra/4-describe/dependency-1/dependency-postGenerateCommands.sh rename to test/extra/4-describe/dependency-1/dependency-postGenerateCommands.sh diff --git a/test/new_tests/extra/4-describe/dependency-1/dependency-preGenerateCommands.sh b/test/extra/4-describe/dependency-1/dependency-preGenerateCommands.sh similarity index 100% rename from test/new_tests/extra/4-describe/dependency-1/dependency-preGenerateCommands.sh rename to test/extra/4-describe/dependency-1/dependency-preGenerateCommands.sh diff --git a/test/new_tests/extra/4-describe/dependency-1/dub.json b/test/extra/4-describe/dependency-1/dub.json similarity index 100% rename from test/new_tests/extra/4-describe/dependency-1/dub.json rename to test/extra/4-describe/dependency-1/dub.json diff --git a/test/new_tests/extra/4-describe/dependency-1/otherdir/dummy.d b/test/extra/4-describe/dependency-1/otherdir/dummy.d similarity index 100% rename from test/new_tests/extra/4-describe/dependency-1/otherdir/dummy.d rename to test/extra/4-describe/dependency-1/otherdir/dummy.d diff --git a/test/new_tests/extra/4-describe/dependency-1/source/dummy.d b/test/extra/4-describe/dependency-1/source/dummy.d similarity index 100% rename from test/new_tests/extra/4-describe/dependency-1/source/dummy.d rename to test/extra/4-describe/dependency-1/source/dummy.d diff --git a/test/new_tests/extra/4-describe/dependency-2/dub.json b/test/extra/4-describe/dependency-2/dub.json similarity index 100% rename from test/new_tests/extra/4-describe/dependency-2/dub.json rename to test/extra/4-describe/dependency-2/dub.json diff --git a/test/new_tests/extra/4-describe/dependency-2/some-extra-string-import-path/dummy.d b/test/extra/4-describe/dependency-2/some-extra-string-import-path/dummy.d similarity index 100% rename from test/new_tests/extra/4-describe/dependency-2/some-extra-string-import-path/dummy.d rename to test/extra/4-describe/dependency-2/some-extra-string-import-path/dummy.d diff --git a/test/new_tests/extra/4-describe/dependency-2/some-path/dummy.d b/test/extra/4-describe/dependency-2/some-path/dummy.d similarity index 100% rename from test/new_tests/extra/4-describe/dependency-2/some-path/dummy.d rename to test/extra/4-describe/dependency-2/some-path/dummy.d diff --git a/test/new_tests/extra/4-describe/dependency-3/dep3-source/dummy.d b/test/extra/4-describe/dependency-3/dep3-source/dummy.d similarity index 100% rename from test/new_tests/extra/4-describe/dependency-3/dep3-source/dummy.d rename to test/extra/4-describe/dependency-3/dep3-source/dummy.d diff --git a/test/new_tests/extra/4-describe/dependency-3/dep3-string-import-path/dummy.d b/test/extra/4-describe/dependency-3/dep3-string-import-path/dummy.d similarity index 100% rename from test/new_tests/extra/4-describe/dependency-3/dep3-string-import-path/dummy.d rename to test/extra/4-describe/dependency-3/dep3-string-import-path/dummy.d diff --git a/test/new_tests/extra/4-describe/dependency-3/dub.json b/test/extra/4-describe/dependency-3/dub.json similarity index 100% rename from test/new_tests/extra/4-describe/dependency-3/dub.json rename to test/extra/4-describe/dependency-3/dub.json diff --git a/test/new_tests/extra/4-describe/project/data/dummy.dat b/test/extra/4-describe/project/data/dummy.dat similarity index 100% rename from test/new_tests/extra/4-describe/project/data/dummy.dat rename to test/extra/4-describe/project/data/dummy.dat diff --git a/test/new_tests/extra/4-describe/project/do-postGenerateCommands.sh b/test/extra/4-describe/project/do-postGenerateCommands.sh similarity index 100% rename from test/new_tests/extra/4-describe/project/do-postGenerateCommands.sh rename to test/extra/4-describe/project/do-postGenerateCommands.sh diff --git a/test/new_tests/extra/4-describe/project/do-preGenerateCommands.sh b/test/extra/4-describe/project/do-preGenerateCommands.sh similarity index 100% rename from test/new_tests/extra/4-describe/project/do-preGenerateCommands.sh rename to test/extra/4-describe/project/do-preGenerateCommands.sh diff --git a/test/new_tests/extra/4-describe/project/dub.json b/test/extra/4-describe/project/dub.json similarity index 100% rename from test/new_tests/extra/4-describe/project/dub.json rename to test/extra/4-describe/project/dub.json diff --git a/test/new_tests/extra/4-describe/project/src/dummy.d b/test/extra/4-describe/project/src/dummy.d similarity index 100% rename from test/new_tests/extra/4-describe/project/src/dummy.d rename to test/extra/4-describe/project/src/dummy.d diff --git a/test/new_tests/extra/4-describe/project/views/dummy.d b/test/extra/4-describe/project/views/dummy.d similarity index 100% rename from test/new_tests/extra/4-describe/project/views/dummy.d rename to test/extra/4-describe/project/views/dummy.d diff --git a/test/new_tests/extra/4-describe/test-utils/dub.json b/test/extra/4-describe/test-utils/dub.json similarity index 100% rename from test/new_tests/extra/4-describe/test-utils/dub.json rename to test/extra/4-describe/test-utils/dub.json diff --git a/test/new_tests/extra/4-describe/test-utils/source/describe_test_utils.d b/test/extra/4-describe/test-utils/source/describe_test_utils.d similarity index 100% rename from test/new_tests/extra/4-describe/test-utils/source/describe_test_utils.d rename to test/extra/4-describe/test-utils/source/describe_test_utils.d diff --git a/test/new_tests/extra/issue1336-registry/.gitignore b/test/extra/issue1336-registry/.gitignore similarity index 100% rename from test/new_tests/extra/issue1336-registry/.gitignore rename to test/extra/issue1336-registry/.gitignore diff --git a/test/new_tests/extra/issue1336-registry/api/packages/infos__packages=%5B%22gitcompatibledubpackage%22%5D&include_dependencies=true&minimize=true b/test/extra/issue1336-registry/api/packages/infos__packages=%5B%22gitcompatibledubpackage%22%5D&include_dependencies=true&minimize=true similarity index 100% rename from test/new_tests/extra/issue1336-registry/api/packages/infos__packages=%5B%22gitcompatibledubpackage%22%5D&include_dependencies=true&minimize=true rename to test/extra/issue1336-registry/api/packages/infos__packages=%5B%22gitcompatibledubpackage%22%5D&include_dependencies=true&minimize=true diff --git a/test/new_tests/extra/issue1336-registry/packages/gitcompatibledubpackage/1.0.2.zip b/test/extra/issue1336-registry/packages/gitcompatibledubpackage/1.0.2.zip similarity index 100% rename from test/new_tests/extra/issue1336-registry/packages/gitcompatibledubpackage/1.0.2.zip rename to test/extra/issue1336-registry/packages/gitcompatibledubpackage/1.0.2.zip diff --git a/test/new_tests/extra/issue1336-registry/packages/gitcompatibledubpackage/1.0.3.zip b/test/extra/issue1336-registry/packages/gitcompatibledubpackage/1.0.3.zip similarity index 100% rename from test/new_tests/extra/issue1336-registry/packages/gitcompatibledubpackage/1.0.3.zip rename to test/extra/issue1336-registry/packages/gitcompatibledubpackage/1.0.3.zip diff --git a/test/new_tests/extra/issue1336-registry/packages/gitcompatibledubpackage/1.0.4.zip b/test/extra/issue1336-registry/packages/gitcompatibledubpackage/1.0.4.zip similarity index 100% rename from test/new_tests/extra/issue1336-registry/packages/gitcompatibledubpackage/1.0.4.zip rename to test/extra/issue1336-registry/packages/gitcompatibledubpackage/1.0.4.zip diff --git a/test/new_tests/extra/issue1416-maven-repo-pkg-supplier/.gitignore b/test/extra/issue1416-maven-repo-pkg-supplier/.gitignore similarity index 100% rename from test/new_tests/extra/issue1416-maven-repo-pkg-supplier/.gitignore rename to test/extra/issue1416-maven-repo-pkg-supplier/.gitignore diff --git a/test/new_tests/extra/issue1416-maven-repo-pkg-supplier/maven/release/dubpackages/maven-dubpackage/1.0.5/maven-dubpackage-1.0.5.zip b/test/extra/issue1416-maven-repo-pkg-supplier/maven/release/dubpackages/maven-dubpackage/1.0.5/maven-dubpackage-1.0.5.zip similarity index 100% rename from test/new_tests/extra/issue1416-maven-repo-pkg-supplier/maven/release/dubpackages/maven-dubpackage/1.0.5/maven-dubpackage-1.0.5.zip rename to test/extra/issue1416-maven-repo-pkg-supplier/maven/release/dubpackages/maven-dubpackage/1.0.5/maven-dubpackage-1.0.5.zip diff --git a/test/new_tests/extra/issue1416-maven-repo-pkg-supplier/maven/release/dubpackages/maven-dubpackage/1.0.6/maven-dubpackage-1.0.6.zip b/test/extra/issue1416-maven-repo-pkg-supplier/maven/release/dubpackages/maven-dubpackage/1.0.6/maven-dubpackage-1.0.6.zip similarity index 100% rename from test/new_tests/extra/issue1416-maven-repo-pkg-supplier/maven/release/dubpackages/maven-dubpackage/1.0.6/maven-dubpackage-1.0.6.zip rename to test/extra/issue1416-maven-repo-pkg-supplier/maven/release/dubpackages/maven-dubpackage/1.0.6/maven-dubpackage-1.0.6.zip diff --git a/test/new_tests/extra/issue1416-maven-repo-pkg-supplier/maven/release/dubpackages/maven-dubpackage/maven-metadata.xml b/test/extra/issue1416-maven-repo-pkg-supplier/maven/release/dubpackages/maven-dubpackage/maven-metadata.xml similarity index 100% rename from test/new_tests/extra/issue1416-maven-repo-pkg-supplier/maven/release/dubpackages/maven-dubpackage/maven-metadata.xml rename to test/extra/issue1416-maven-repo-pkg-supplier/maven/release/dubpackages/maven-dubpackage/maven-metadata.xml diff --git a/test/new_tests/extra/test_registry/.gitignore b/test/extra/test_registry/.gitignore similarity index 100% rename from test/new_tests/extra/test_registry/.gitignore rename to test/extra/test_registry/.gitignore diff --git a/test/new_tests/extra/test_registry/dub.json b/test/extra/test_registry/dub.json similarity index 100% rename from test/new_tests/extra/test_registry/dub.json rename to test/extra/test_registry/dub.json diff --git a/test/new_tests/extra/test_registry/source/test_registry_helper.d b/test/extra/test_registry/source/test_registry_helper.d similarity index 100% rename from test/new_tests/extra/test_registry/source/test_registry_helper.d rename to test/extra/test_registry/source/test_registry_helper.d diff --git a/test/new_tests/extra/test_registry/test_registry.d b/test/extra/test_registry/test_registry.d similarity index 100% rename from test/new_tests/extra/test_registry/test_registry.d rename to test/extra/test_registry/test_registry.d diff --git a/test/new_tests/feat663-search/dub.json b/test/feat663-search/dub.json similarity index 100% rename from test/new_tests/feat663-search/dub.json rename to test/feat663-search/dub.json diff --git a/test/new_tests/feat663-search/source/app.d b/test/feat663-search/source/app.d similarity index 100% rename from test/new_tests/feat663-search/source/app.d rename to test/feat663-search/source/app.d diff --git a/test/new_tests/fetchzip/dub.json b/test/fetchzip/dub.json similarity index 100% rename from test/new_tests/fetchzip/dub.json rename to test/fetchzip/dub.json diff --git a/test/new_tests/fetchzip/source/app.d b/test/fetchzip/source/app.d similarity index 100% rename from test/new_tests/fetchzip/source/app.d rename to test/fetchzip/source/app.d diff --git a/test/new_tests/fetchzip/test.config b/test/fetchzip/test.config similarity index 100% rename from test/new_tests/fetchzip/test.config rename to test/fetchzip/test.config diff --git a/test/new_tests/filesystem-version-with-buildinfo/.gitignore b/test/filesystem-version-with-buildinfo/.gitignore similarity index 100% rename from test/new_tests/filesystem-version-with-buildinfo/.gitignore rename to test/filesystem-version-with-buildinfo/.gitignore diff --git a/test/new_tests/filesystem-version-with-buildinfo/dub.json b/test/filesystem-version-with-buildinfo/dub.json similarity index 100% rename from test/new_tests/filesystem-version-with-buildinfo/dub.json rename to test/filesystem-version-with-buildinfo/dub.json diff --git a/test/new_tests/filesystem-version-with-buildinfo/file-registry/fs-json-dubpackage-1.0.7+build-9-9-9.zip b/test/filesystem-version-with-buildinfo/file-registry/fs-json-dubpackage-1.0.7+build-9-9-9.zip similarity index 100% rename from test/new_tests/filesystem-version-with-buildinfo/file-registry/fs-json-dubpackage-1.0.7+build-9-9-9.zip rename to test/filesystem-version-with-buildinfo/file-registry/fs-json-dubpackage-1.0.7+build-9-9-9.zip diff --git a/test/new_tests/filesystem-version-with-buildinfo/source/app.d b/test/filesystem-version-with-buildinfo/source/app.d similarity index 100% rename from test/new_tests/filesystem-version-with-buildinfo/source/app.d rename to test/filesystem-version-with-buildinfo/source/app.d diff --git a/test/new_tests/frameworks/dub.sdl b/test/frameworks/dub.sdl similarity index 100% rename from test/new_tests/frameworks/dub.sdl rename to test/frameworks/dub.sdl diff --git a/test/new_tests/frameworks/source/app.d b/test/frameworks/source/app.d similarity index 100% rename from test/new_tests/frameworks/source/app.d rename to test/frameworks/source/app.d diff --git a/test/new_tests/frameworks/test.config b/test/frameworks/test.config similarity index 100% rename from test/new_tests/frameworks/test.config rename to test/frameworks/test.config diff --git a/test/new_tests/git-dependency/.gitignore b/test/git-dependency/.gitignore similarity index 100% rename from test/new_tests/git-dependency/.gitignore rename to test/git-dependency/.gitignore diff --git a/test/new_tests/git-dependency/dub.json b/test/git-dependency/dub.json similarity index 100% rename from test/new_tests/git-dependency/dub.json rename to test/git-dependency/dub.json diff --git a/test/new_tests/git-dependency/src/app.d b/test/git-dependency/src/app.d similarity index 100% rename from test/new_tests/git-dependency/src/app.d rename to test/git-dependency/src/app.d diff --git a/test/new_tests/help/dub.json b/test/help/dub.json similarity index 100% rename from test/new_tests/help/dub.json rename to test/help/dub.json diff --git a/test/new_tests/help/source/app.d b/test/help/source/app.d similarity index 100% rename from test/new_tests/help/source/app.d rename to test/help/source/app.d diff --git a/test/new_tests/ignore-hidden-1/.gitignore b/test/ignore-hidden-1/.gitignore similarity index 100% rename from test/new_tests/ignore-hidden-1/.gitignore rename to test/ignore-hidden-1/.gitignore diff --git a/test/new_tests/ignore-hidden-1/dub.json b/test/ignore-hidden-1/dub.json similarity index 100% rename from test/new_tests/ignore-hidden-1/dub.json rename to test/ignore-hidden-1/dub.json diff --git a/test/new_tests/ignore-hidden-1/source/.hidden.d b/test/ignore-hidden-1/source/.hidden.d similarity index 100% rename from test/new_tests/ignore-hidden-1/source/.hidden.d rename to test/ignore-hidden-1/source/.hidden.d diff --git a/test/new_tests/ignore-hidden-1/source/app.d b/test/ignore-hidden-1/source/app.d similarity index 100% rename from test/new_tests/ignore-hidden-1/source/app.d rename to test/ignore-hidden-1/source/app.d diff --git a/test/new_tests/ignore-hidden-1/test.config b/test/ignore-hidden-1/test.config similarity index 100% rename from test/new_tests/ignore-hidden-1/test.config rename to test/ignore-hidden-1/test.config diff --git a/test/new_tests/ignore-hidden-2/.gitignore b/test/ignore-hidden-2/.gitignore similarity index 100% rename from test/new_tests/ignore-hidden-2/.gitignore rename to test/ignore-hidden-2/.gitignore diff --git a/test/new_tests/ignore-hidden-2/dub.json b/test/ignore-hidden-2/dub.json similarity index 100% rename from test/new_tests/ignore-hidden-2/dub.json rename to test/ignore-hidden-2/dub.json diff --git a/test/new_tests/ignore-hidden-2/source/.hidden.d b/test/ignore-hidden-2/source/.hidden.d similarity index 100% rename from test/new_tests/ignore-hidden-2/source/.hidden.d rename to test/ignore-hidden-2/source/.hidden.d diff --git a/test/new_tests/ignore-hidden-2/source/app.d b/test/ignore-hidden-2/source/app.d similarity index 100% rename from test/new_tests/ignore-hidden-2/source/app.d rename to test/ignore-hidden-2/source/app.d diff --git a/test/new_tests/ignore-hidden-2/test.config b/test/ignore-hidden-2/test.config similarity index 100% rename from test/new_tests/ignore-hidden-2/test.config rename to test/ignore-hidden-2/test.config diff --git a/test/new_tests/ignore-useless-arch-switch/dub.sdl b/test/ignore-useless-arch-switch/dub.sdl similarity index 100% rename from test/new_tests/ignore-useless-arch-switch/dub.sdl rename to test/ignore-useless-arch-switch/dub.sdl diff --git a/test/new_tests/ignore-useless-arch-switch/source/app.d b/test/ignore-useless-arch-switch/source/app.d similarity index 100% rename from test/new_tests/ignore-useless-arch-switch/source/app.d rename to test/ignore-useless-arch-switch/source/app.d diff --git a/test/new_tests/injected-from-dependency/.gitignore b/test/injected-from-dependency/.gitignore similarity index 100% rename from test/new_tests/injected-from-dependency/.gitignore rename to test/injected-from-dependency/.gitignore diff --git a/test/new_tests/injected-from-dependency/ahook.d b/test/injected-from-dependency/ahook.d similarity index 100% rename from test/new_tests/injected-from-dependency/ahook.d rename to test/injected-from-dependency/ahook.d diff --git a/test/new_tests/injected-from-dependency/dub.json b/test/injected-from-dependency/dub.json similarity index 100% rename from test/new_tests/injected-from-dependency/dub.json rename to test/injected-from-dependency/dub.json diff --git a/test/new_tests/injected-from-dependency/source/entry.d b/test/injected-from-dependency/source/entry.d similarity index 100% rename from test/new_tests/injected-from-dependency/source/entry.d rename to test/injected-from-dependency/source/entry.d diff --git a/test/new_tests/injected-from-dependency/toload/vars.d b/test/injected-from-dependency/toload/vars.d similarity index 100% rename from test/new_tests/injected-from-dependency/toload/vars.d rename to test/injected-from-dependency/toload/vars.d diff --git a/test/new_tests/interactive-remove/dub.json b/test/interactive-remove/dub.json similarity index 100% rename from test/new_tests/interactive-remove/dub.json rename to test/interactive-remove/dub.json diff --git a/test/new_tests/interactive-remove/source/app.d b/test/interactive-remove/source/app.d similarity index 100% rename from test/new_tests/interactive-remove/source/app.d rename to test/interactive-remove/source/app.d diff --git a/test/new_tests/issue1003-check-empty-ld-flags/dub.json b/test/issue1003-check-empty-ld-flags/dub.json similarity index 100% rename from test/new_tests/issue1003-check-empty-ld-flags/dub.json rename to test/issue1003-check-empty-ld-flags/dub.json diff --git a/test/new_tests/issue1003-check-empty-ld-flags/source/app.d b/test/issue1003-check-empty-ld-flags/source/app.d similarity index 100% rename from test/new_tests/issue1003-check-empty-ld-flags/source/app.d rename to test/issue1003-check-empty-ld-flags/source/app.d diff --git a/test/new_tests/issue1003-check-empty-ld-flags/test.config b/test/issue1003-check-empty-ld-flags/test.config similarity index 100% rename from test/new_tests/issue1003-check-empty-ld-flags/test.config rename to test/issue1003-check-empty-ld-flags/test.config diff --git a/test/new_tests/issue1004-override-config/.gitignore b/test/issue1004-override-config/.gitignore similarity index 100% rename from test/new_tests/issue1004-override-config/.gitignore rename to test/issue1004-override-config/.gitignore diff --git a/test/new_tests/issue1004-override-config/dub.json b/test/issue1004-override-config/dub.json similarity index 100% rename from test/new_tests/issue1004-override-config/dub.json rename to test/issue1004-override-config/dub.json diff --git a/test/new_tests/issue1004-override-config/sample/a/a.d b/test/issue1004-override-config/sample/a/a.d similarity index 100% rename from test/new_tests/issue1004-override-config/sample/a/a.d rename to test/issue1004-override-config/sample/a/a.d diff --git a/test/new_tests/issue1004-override-config/sample/a/dub.sdl b/test/issue1004-override-config/sample/a/dub.sdl similarity index 100% rename from test/new_tests/issue1004-override-config/sample/a/dub.sdl rename to test/issue1004-override-config/sample/a/dub.sdl diff --git a/test/new_tests/issue1004-override-config/sample/main/dub.sdl b/test/issue1004-override-config/sample/main/dub.sdl similarity index 100% rename from test/new_tests/issue1004-override-config/sample/main/dub.sdl rename to test/issue1004-override-config/sample/main/dub.sdl diff --git a/test/new_tests/issue1004-override-config/sample/main/source/main.d b/test/issue1004-override-config/sample/main/source/main.d similarity index 100% rename from test/new_tests/issue1004-override-config/sample/main/source/main.d rename to test/issue1004-override-config/sample/main/source/main.d diff --git a/test/new_tests/issue1004-override-config/source/app.d b/test/issue1004-override-config/source/app.d similarity index 100% rename from test/new_tests/issue1004-override-config/source/app.d rename to test/issue1004-override-config/source/app.d diff --git a/test/new_tests/issue1005-configuration-resolution/.gitignore b/test/issue1005-configuration-resolution/.gitignore similarity index 100% rename from test/new_tests/issue1005-configuration-resolution/.gitignore rename to test/issue1005-configuration-resolution/.gitignore diff --git a/test/new_tests/issue1005-configuration-resolution/dub.json b/test/issue1005-configuration-resolution/dub.json similarity index 100% rename from test/new_tests/issue1005-configuration-resolution/dub.json rename to test/issue1005-configuration-resolution/dub.json diff --git a/test/new_tests/issue1005-configuration-resolution/sample/a/dub.sdl b/test/issue1005-configuration-resolution/sample/a/dub.sdl similarity index 100% rename from test/new_tests/issue1005-configuration-resolution/sample/a/dub.sdl rename to test/issue1005-configuration-resolution/sample/a/dub.sdl diff --git a/test/new_tests/issue1005-configuration-resolution/sample/b/dub.sdl b/test/issue1005-configuration-resolution/sample/b/dub.sdl similarity index 100% rename from test/new_tests/issue1005-configuration-resolution/sample/b/dub.sdl rename to test/issue1005-configuration-resolution/sample/b/dub.sdl diff --git a/test/new_tests/issue1005-configuration-resolution/sample/b/source/b.d b/test/issue1005-configuration-resolution/sample/b/source/b.d similarity index 100% rename from test/new_tests/issue1005-configuration-resolution/sample/b/source/b.d rename to test/issue1005-configuration-resolution/sample/b/source/b.d diff --git a/test/new_tests/issue1005-configuration-resolution/sample/c/dub.sdl b/test/issue1005-configuration-resolution/sample/c/dub.sdl similarity index 100% rename from test/new_tests/issue1005-configuration-resolution/sample/c/dub.sdl rename to test/issue1005-configuration-resolution/sample/c/dub.sdl diff --git a/test/new_tests/issue1005-configuration-resolution/sample/main/dub.sdl b/test/issue1005-configuration-resolution/sample/main/dub.sdl similarity index 100% rename from test/new_tests/issue1005-configuration-resolution/sample/main/dub.sdl rename to test/issue1005-configuration-resolution/sample/main/dub.sdl diff --git a/test/new_tests/issue1005-configuration-resolution/sample/main/source/app.d b/test/issue1005-configuration-resolution/sample/main/source/app.d similarity index 100% rename from test/new_tests/issue1005-configuration-resolution/sample/main/source/app.d rename to test/issue1005-configuration-resolution/sample/main/source/app.d diff --git a/test/new_tests/issue1005-configuration-resolution/source/app.d b/test/issue1005-configuration-resolution/source/app.d similarity index 100% rename from test/new_tests/issue1005-configuration-resolution/source/app.d rename to test/issue1005-configuration-resolution/source/app.d diff --git a/test/new_tests/issue1024-selective-upgrade/.gitignore b/test/issue1024-selective-upgrade/.gitignore similarity index 100% rename from test/new_tests/issue1024-selective-upgrade/.gitignore rename to test/issue1024-selective-upgrade/.gitignore diff --git a/test/new_tests/issue1024-selective-upgrade/dub.json b/test/issue1024-selective-upgrade/dub.json similarity index 100% rename from test/new_tests/issue1024-selective-upgrade/dub.json rename to test/issue1024-selective-upgrade/dub.json diff --git a/test/new_tests/issue1024-selective-upgrade/sample/a-1.0.0/dub.sdl b/test/issue1024-selective-upgrade/sample/a-1.0.0/dub.sdl similarity index 100% rename from test/new_tests/issue1024-selective-upgrade/sample/a-1.0.0/dub.sdl rename to test/issue1024-selective-upgrade/sample/a-1.0.0/dub.sdl diff --git a/test/new_tests/issue1024-selective-upgrade/sample/a-1.0.1/dub.sdl b/test/issue1024-selective-upgrade/sample/a-1.0.1/dub.sdl similarity index 100% rename from test/new_tests/issue1024-selective-upgrade/sample/a-1.0.1/dub.sdl rename to test/issue1024-selective-upgrade/sample/a-1.0.1/dub.sdl diff --git a/test/new_tests/issue1024-selective-upgrade/sample/b-1.0.0/dub.sdl b/test/issue1024-selective-upgrade/sample/b-1.0.0/dub.sdl similarity index 100% rename from test/new_tests/issue1024-selective-upgrade/sample/b-1.0.0/dub.sdl rename to test/issue1024-selective-upgrade/sample/b-1.0.0/dub.sdl diff --git a/test/new_tests/issue1024-selective-upgrade/sample/b-1.0.1/dub.sdl b/test/issue1024-selective-upgrade/sample/b-1.0.1/dub.sdl similarity index 100% rename from test/new_tests/issue1024-selective-upgrade/sample/b-1.0.1/dub.sdl rename to test/issue1024-selective-upgrade/sample/b-1.0.1/dub.sdl diff --git a/test/new_tests/issue1024-selective-upgrade/sample/main/dub.sdl b/test/issue1024-selective-upgrade/sample/main/dub.sdl similarity index 100% rename from test/new_tests/issue1024-selective-upgrade/sample/main/dub.sdl rename to test/issue1024-selective-upgrade/sample/main/dub.sdl diff --git a/test/new_tests/issue1024-selective-upgrade/source/app.d b/test/issue1024-selective-upgrade/source/app.d similarity index 100% rename from test/new_tests/issue1024-selective-upgrade/source/app.d rename to test/issue1024-selective-upgrade/source/app.d diff --git a/test/new_tests/issue103-single-file-package/.gitignore b/test/issue103-single-file-package/.gitignore similarity index 100% rename from test/new_tests/issue103-single-file-package/.gitignore rename to test/issue103-single-file-package/.gitignore diff --git a/test/new_tests/issue103-single-file-package/dub.json b/test/issue103-single-file-package/dub.json similarity index 100% rename from test/new_tests/issue103-single-file-package/dub.json rename to test/issue103-single-file-package/dub.json diff --git a/test/new_tests/issue103-single-file-package/sample/json.d b/test/issue103-single-file-package/sample/json.d similarity index 100% rename from test/new_tests/issue103-single-file-package/sample/json.d rename to test/issue103-single-file-package/sample/json.d diff --git a/test/new_tests/issue103-single-file-package/sample/no-ext b/test/issue103-single-file-package/sample/no-ext similarity index 90% rename from test/new_tests/issue103-single-file-package/sample/no-ext rename to test/issue103-single-file-package/sample/no-ext index 922da3769d..d956dcc5b5 100755 --- a/test/new_tests/issue103-single-file-package/sample/no-ext +++ b/test/issue103-single-file-package/sample/no-ext @@ -1,4 +1,4 @@ -#!../../../../bin/dub +#!../../../bin/dub /+ dub.sdl: name "single-file-test" +/ diff --git a/test/new_tests/issue103-single-file-package/sample/sdl.d b/test/issue103-single-file-package/sample/sdl.d similarity index 90% rename from test/new_tests/issue103-single-file-package/sample/sdl.d rename to test/issue103-single-file-package/sample/sdl.d index 922da3769d..d956dcc5b5 100755 --- a/test/new_tests/issue103-single-file-package/sample/sdl.d +++ b/test/issue103-single-file-package/sample/sdl.d @@ -1,4 +1,4 @@ -#!../../../../bin/dub +#!../../../bin/dub /+ dub.sdl: name "single-file-test" +/ diff --git a/test/new_tests/issue103-single-file-package/sample/w-dep.d b/test/issue103-single-file-package/sample/w-dep.d similarity index 100% rename from test/new_tests/issue103-single-file-package/sample/w-dep.d rename to test/issue103-single-file-package/sample/w-dep.d diff --git a/test/new_tests/issue103-single-file-package/source/app.d b/test/issue103-single-file-package/source/app.d similarity index 100% rename from test/new_tests/issue103-single-file-package/source/app.d rename to test/issue103-single-file-package/source/app.d diff --git a/test/new_tests/issue1037-better-dependency-messages/.gitignore b/test/issue1037-better-dependency-messages/.gitignore similarity index 100% rename from test/new_tests/issue1037-better-dependency-messages/.gitignore rename to test/issue1037-better-dependency-messages/.gitignore diff --git a/test/new_tests/issue1037-better-dependency-messages/dub.json b/test/issue1037-better-dependency-messages/dub.json similarity index 100% rename from test/new_tests/issue1037-better-dependency-messages/dub.json rename to test/issue1037-better-dependency-messages/dub.json diff --git a/test/new_tests/issue1037-better-dependency-messages/sample/b/dub.json b/test/issue1037-better-dependency-messages/sample/b/dub.json similarity index 100% rename from test/new_tests/issue1037-better-dependency-messages/sample/b/dub.json rename to test/issue1037-better-dependency-messages/sample/b/dub.json diff --git a/test/new_tests/issue1037-better-dependency-messages/sample/dub.json b/test/issue1037-better-dependency-messages/sample/dub.json similarity index 100% rename from test/new_tests/issue1037-better-dependency-messages/sample/dub.json rename to test/issue1037-better-dependency-messages/sample/dub.json diff --git a/test/new_tests/issue1037-better-dependency-messages/source/app.d b/test/issue1037-better-dependency-messages/source/app.d similarity index 100% rename from test/new_tests/issue1037-better-dependency-messages/source/app.d rename to test/issue1037-better-dependency-messages/source/app.d diff --git a/test/new_tests/issue1040-run-with-ver/dub.json b/test/issue1040-run-with-ver/dub.json similarity index 100% rename from test/new_tests/issue1040-run-with-ver/dub.json rename to test/issue1040-run-with-ver/dub.json diff --git a/test/new_tests/issue1040-run-with-ver/source/app.d b/test/issue1040-run-with-ver/source/app.d similarity index 100% rename from test/new_tests/issue1040-run-with-ver/source/app.d rename to test/issue1040-run-with-ver/source/app.d diff --git a/test/new_tests/issue1053-extra-files-visuald/.gitignore b/test/issue1053-extra-files-visuald/.gitignore similarity index 100% rename from test/new_tests/issue1053-extra-files-visuald/.gitignore rename to test/issue1053-extra-files-visuald/.gitignore diff --git a/test/new_tests/issue1053-extra-files-visuald/dub.json b/test/issue1053-extra-files-visuald/dub.json similarity index 100% rename from test/new_tests/issue1053-extra-files-visuald/dub.json rename to test/issue1053-extra-files-visuald/dub.json diff --git a/test/new_tests/issue1053-extra-files-visuald/sample/dub.json b/test/issue1053-extra-files-visuald/sample/dub.json similarity index 100% rename from test/new_tests/issue1053-extra-files-visuald/sample/dub.json rename to test/issue1053-extra-files-visuald/sample/dub.json diff --git a/test/new_tests/issue1053-extra-files-visuald/sample/shaders/saturate.vert b/test/issue1053-extra-files-visuald/sample/shaders/saturate.vert similarity index 100% rename from test/new_tests/issue1053-extra-files-visuald/sample/shaders/saturate.vert rename to test/issue1053-extra-files-visuald/sample/shaders/saturate.vert diff --git a/test/new_tests/issue1053-extra-files-visuald/sample/shaders/warp.geom b/test/issue1053-extra-files-visuald/sample/shaders/warp.geom similarity index 100% rename from test/new_tests/issue1053-extra-files-visuald/sample/shaders/warp.geom rename to test/issue1053-extra-files-visuald/sample/shaders/warp.geom diff --git a/test/new_tests/issue1053-extra-files-visuald/sample/source/app.d b/test/issue1053-extra-files-visuald/sample/source/app.d similarity index 100% rename from test/new_tests/issue1053-extra-files-visuald/sample/source/app.d rename to test/issue1053-extra-files-visuald/sample/source/app.d diff --git a/test/new_tests/issue1053-extra-files-visuald/sample/text/LICENSE.txt b/test/issue1053-extra-files-visuald/sample/text/LICENSE.txt similarity index 100% rename from test/new_tests/issue1053-extra-files-visuald/sample/text/LICENSE.txt rename to test/issue1053-extra-files-visuald/sample/text/LICENSE.txt diff --git a/test/new_tests/issue1053-extra-files-visuald/sample/text/README.txt b/test/issue1053-extra-files-visuald/sample/text/README.txt similarity index 100% rename from test/new_tests/issue1053-extra-files-visuald/sample/text/README.txt rename to test/issue1053-extra-files-visuald/sample/text/README.txt diff --git a/test/new_tests/issue1053-extra-files-visuald/source/app.d b/test/issue1053-extra-files-visuald/source/app.d similarity index 100% rename from test/new_tests/issue1053-extra-files-visuald/source/app.d rename to test/issue1053-extra-files-visuald/source/app.d diff --git a/test/new_tests/issue1070-init-mistakes-dirs-as-files/.gitignore b/test/issue1070-init-mistakes-dirs-as-files/.gitignore similarity index 100% rename from test/new_tests/issue1070-init-mistakes-dirs-as-files/.gitignore rename to test/issue1070-init-mistakes-dirs-as-files/.gitignore diff --git a/test/new_tests/issue1070-init-mistakes-dirs-as-files/dub.json b/test/issue1070-init-mistakes-dirs-as-files/dub.json similarity index 100% rename from test/new_tests/issue1070-init-mistakes-dirs-as-files/dub.json rename to test/issue1070-init-mistakes-dirs-as-files/dub.json diff --git a/test/new_tests/issue1070-init-mistakes-dirs-as-files/sample/source/.empty b/test/issue1070-init-mistakes-dirs-as-files/sample/source/.empty similarity index 100% rename from test/new_tests/issue1070-init-mistakes-dirs-as-files/sample/source/.empty rename to test/issue1070-init-mistakes-dirs-as-files/sample/source/.empty diff --git a/test/new_tests/issue1070-init-mistakes-dirs-as-files/source/app.d b/test/issue1070-init-mistakes-dirs-as-files/source/app.d similarity index 100% rename from test/new_tests/issue1070-init-mistakes-dirs-as-files/source/app.d rename to test/issue1070-init-mistakes-dirs-as-files/source/app.d diff --git a/test/new_tests/issue1091-bogus-rebuild/.gitignore b/test/issue1091-bogus-rebuild/.gitignore similarity index 100% rename from test/new_tests/issue1091-bogus-rebuild/.gitignore rename to test/issue1091-bogus-rebuild/.gitignore diff --git a/test/new_tests/issue1091-bogus-rebuild/dub.json b/test/issue1091-bogus-rebuild/dub.json similarity index 100% rename from test/new_tests/issue1091-bogus-rebuild/dub.json rename to test/issue1091-bogus-rebuild/dub.json diff --git a/test/new_tests/issue1091-bogus-rebuild/sample/dub.sdl b/test/issue1091-bogus-rebuild/sample/dub.sdl similarity index 100% rename from test/new_tests/issue1091-bogus-rebuild/sample/dub.sdl rename to test/issue1091-bogus-rebuild/sample/dub.sdl diff --git a/test/new_tests/issue1091-bogus-rebuild/sample/source/app.d b/test/issue1091-bogus-rebuild/sample/source/app.d similarity index 100% rename from test/new_tests/issue1091-bogus-rebuild/sample/source/app.d rename to test/issue1091-bogus-rebuild/sample/source/app.d diff --git a/test/new_tests/issue1091-bogus-rebuild/source/app.d b/test/issue1091-bogus-rebuild/source/app.d similarity index 100% rename from test/new_tests/issue1091-bogus-rebuild/source/app.d rename to test/issue1091-bogus-rebuild/source/app.d diff --git a/test/new_tests/issue1117-extra-dependency-files/.gitignore b/test/issue1117-extra-dependency-files/.gitignore similarity index 100% rename from test/new_tests/issue1117-extra-dependency-files/.gitignore rename to test/issue1117-extra-dependency-files/.gitignore diff --git a/test/new_tests/issue1117-extra-dependency-files/dub.json b/test/issue1117-extra-dependency-files/dub.json similarity index 100% rename from test/new_tests/issue1117-extra-dependency-files/dub.json rename to test/issue1117-extra-dependency-files/dub.json diff --git a/test/new_tests/issue1117-extra-dependency-files/sample/dependency.txt b/test/issue1117-extra-dependency-files/sample/dependency.txt similarity index 100% rename from test/new_tests/issue1117-extra-dependency-files/sample/dependency.txt rename to test/issue1117-extra-dependency-files/sample/dependency.txt diff --git a/test/new_tests/issue1117-extra-dependency-files/sample/dub.json b/test/issue1117-extra-dependency-files/sample/dub.json similarity index 100% rename from test/new_tests/issue1117-extra-dependency-files/sample/dub.json rename to test/issue1117-extra-dependency-files/sample/dub.json diff --git a/test/new_tests/issue1117-extra-dependency-files/sample/source/app.d b/test/issue1117-extra-dependency-files/sample/source/app.d similarity index 100% rename from test/new_tests/issue1117-extra-dependency-files/sample/source/app.d rename to test/issue1117-extra-dependency-files/sample/source/app.d diff --git a/test/new_tests/issue1117-extra-dependency-files/source/app.d b/test/issue1117-extra-dependency-files/source/app.d similarity index 100% rename from test/new_tests/issue1117-extra-dependency-files/source/app.d rename to test/issue1117-extra-dependency-files/source/app.d diff --git a/test/new_tests/issue1136-temp-copy-files/.gitignore b/test/issue1136-temp-copy-files/.gitignore similarity index 100% rename from test/new_tests/issue1136-temp-copy-files/.gitignore rename to test/issue1136-temp-copy-files/.gitignore diff --git a/test/new_tests/issue1136-temp-copy-files/dub.json b/test/issue1136-temp-copy-files/dub.json similarity index 100% rename from test/new_tests/issue1136-temp-copy-files/dub.json rename to test/issue1136-temp-copy-files/dub.json diff --git a/test/new_tests/issue1136-temp-copy-files/sample/app.d b/test/issue1136-temp-copy-files/sample/app.d similarity index 100% rename from test/new_tests/issue1136-temp-copy-files/sample/app.d rename to test/issue1136-temp-copy-files/sample/app.d diff --git a/test/new_tests/issue1136-temp-copy-files/sample/mylib/dub.sdl b/test/issue1136-temp-copy-files/sample/mylib/dub.sdl similarity index 100% rename from test/new_tests/issue1136-temp-copy-files/sample/mylib/dub.sdl rename to test/issue1136-temp-copy-files/sample/mylib/dub.sdl diff --git a/test/new_tests/issue1136-temp-copy-files/sample/mylib/helloworld.txt b/test/issue1136-temp-copy-files/sample/mylib/helloworld.txt similarity index 100% rename from test/new_tests/issue1136-temp-copy-files/sample/mylib/helloworld.txt rename to test/issue1136-temp-copy-files/sample/mylib/helloworld.txt diff --git a/test/new_tests/issue1136-temp-copy-files/source/app.d b/test/issue1136-temp-copy-files/source/app.d similarity index 100% rename from test/new_tests/issue1136-temp-copy-files/source/app.d rename to test/issue1136-temp-copy-files/source/app.d diff --git a/test/new_tests/issue1158-stdin-for-single-files/.gitignore b/test/issue1158-stdin-for-single-files/.gitignore similarity index 100% rename from test/new_tests/issue1158-stdin-for-single-files/.gitignore rename to test/issue1158-stdin-for-single-files/.gitignore diff --git a/test/new_tests/issue1158-stdin-for-single-files/dub.json b/test/issue1158-stdin-for-single-files/dub.json similarity index 100% rename from test/new_tests/issue1158-stdin-for-single-files/dub.json rename to test/issue1158-stdin-for-single-files/dub.json diff --git a/test/new_tests/issue1158-stdin-for-single-files/source/app.d b/test/issue1158-stdin-for-single-files/source/app.d similarity index 100% rename from test/new_tests/issue1158-stdin-for-single-files/source/app.d rename to test/issue1158-stdin-for-single-files/source/app.d diff --git a/test/new_tests/issue1158-stdin-for-single-files/stdin.d b/test/issue1158-stdin-for-single-files/stdin.d similarity index 100% rename from test/new_tests/issue1158-stdin-for-single-files/stdin.d rename to test/issue1158-stdin-for-single-files/stdin.d diff --git a/test/new_tests/issue1180-local-cache-broken/.gitignore b/test/issue1180-local-cache-broken/.gitignore similarity index 100% rename from test/new_tests/issue1180-local-cache-broken/.gitignore rename to test/issue1180-local-cache-broken/.gitignore diff --git a/test/new_tests/issue1180-local-cache-broken/dub.json b/test/issue1180-local-cache-broken/dub.json similarity index 100% rename from test/new_tests/issue1180-local-cache-broken/dub.json rename to test/issue1180-local-cache-broken/dub.json diff --git a/test/new_tests/issue1180-local-cache-broken/sample/dub.json b/test/issue1180-local-cache-broken/sample/dub.json similarity index 100% rename from test/new_tests/issue1180-local-cache-broken/sample/dub.json rename to test/issue1180-local-cache-broken/sample/dub.json diff --git a/test/new_tests/issue1180-local-cache-broken/sample/source/app.d b/test/issue1180-local-cache-broken/sample/source/app.d similarity index 100% rename from test/new_tests/issue1180-local-cache-broken/sample/source/app.d rename to test/issue1180-local-cache-broken/sample/source/app.d diff --git a/test/new_tests/issue1180-local-cache-broken/source/app.d b/test/issue1180-local-cache-broken/source/app.d similarity index 100% rename from test/new_tests/issue1180-local-cache-broken/source/app.d rename to test/issue1180-local-cache-broken/source/app.d diff --git a/test/new_tests/issue1180-local-cache-broken/test.config b/test/issue1180-local-cache-broken/test.config similarity index 100% rename from test/new_tests/issue1180-local-cache-broken/test.config rename to test/issue1180-local-cache-broken/test.config diff --git a/test/new_tests/issue1194-warn-wrong-subconfig/.gitignore b/test/issue1194-warn-wrong-subconfig/.gitignore similarity index 100% rename from test/new_tests/issue1194-warn-wrong-subconfig/.gitignore rename to test/issue1194-warn-wrong-subconfig/.gitignore diff --git a/test/new_tests/issue1194-warn-wrong-subconfig/dub.json b/test/issue1194-warn-wrong-subconfig/dub.json similarity index 100% rename from test/new_tests/issue1194-warn-wrong-subconfig/dub.json rename to test/issue1194-warn-wrong-subconfig/dub.json diff --git a/test/new_tests/issue1194-warn-wrong-subconfig/sample/dub.sdl b/test/issue1194-warn-wrong-subconfig/sample/dub.sdl similarity index 100% rename from test/new_tests/issue1194-warn-wrong-subconfig/sample/dub.sdl rename to test/issue1194-warn-wrong-subconfig/sample/dub.sdl diff --git a/test/new_tests/issue1194-warn-wrong-subconfig/sample/source/app.d b/test/issue1194-warn-wrong-subconfig/sample/source/app.d similarity index 100% rename from test/new_tests/issue1194-warn-wrong-subconfig/sample/source/app.d rename to test/issue1194-warn-wrong-subconfig/sample/source/app.d diff --git a/test/new_tests/issue1194-warn-wrong-subconfig/source/app.d b/test/issue1194-warn-wrong-subconfig/source/app.d similarity index 100% rename from test/new_tests/issue1194-warn-wrong-subconfig/source/app.d rename to test/issue1194-warn-wrong-subconfig/source/app.d diff --git a/test/new_tests/issue1262-version-inheritance-diamond/.gitignore b/test/issue1262-version-inheritance-diamond/.gitignore similarity index 100% rename from test/new_tests/issue1262-version-inheritance-diamond/.gitignore rename to test/issue1262-version-inheritance-diamond/.gitignore diff --git a/test/new_tests/issue1262-version-inheritance-diamond/daughter/dub.sdl b/test/issue1262-version-inheritance-diamond/daughter/dub.sdl similarity index 100% rename from test/new_tests/issue1262-version-inheritance-diamond/daughter/dub.sdl rename to test/issue1262-version-inheritance-diamond/daughter/dub.sdl diff --git a/test/new_tests/issue1262-version-inheritance-diamond/daughter/source/dummy.d b/test/issue1262-version-inheritance-diamond/daughter/source/dummy.d similarity index 100% rename from test/new_tests/issue1262-version-inheritance-diamond/daughter/source/dummy.d rename to test/issue1262-version-inheritance-diamond/daughter/source/dummy.d diff --git a/test/new_tests/issue1262-version-inheritance-diamond/diamond/dub.sdl b/test/issue1262-version-inheritance-diamond/diamond/dub.sdl similarity index 100% rename from test/new_tests/issue1262-version-inheritance-diamond/diamond/dub.sdl rename to test/issue1262-version-inheritance-diamond/diamond/dub.sdl diff --git a/test/new_tests/issue1262-version-inheritance-diamond/diamond/source/dummy.d b/test/issue1262-version-inheritance-diamond/diamond/source/dummy.d similarity index 100% rename from test/new_tests/issue1262-version-inheritance-diamond/diamond/source/dummy.d rename to test/issue1262-version-inheritance-diamond/diamond/source/dummy.d diff --git a/test/new_tests/issue1262-version-inheritance-diamond/dub.sdl b/test/issue1262-version-inheritance-diamond/dub.sdl similarity index 100% rename from test/new_tests/issue1262-version-inheritance-diamond/dub.sdl rename to test/issue1262-version-inheritance-diamond/dub.sdl diff --git a/test/new_tests/issue1262-version-inheritance-diamond/son/dub.sdl b/test/issue1262-version-inheritance-diamond/son/dub.sdl similarity index 100% rename from test/new_tests/issue1262-version-inheritance-diamond/son/dub.sdl rename to test/issue1262-version-inheritance-diamond/son/dub.sdl diff --git a/test/new_tests/issue1262-version-inheritance-diamond/son/source/dummy.d b/test/issue1262-version-inheritance-diamond/son/source/dummy.d similarity index 100% rename from test/new_tests/issue1262-version-inheritance-diamond/son/source/dummy.d rename to test/issue1262-version-inheritance-diamond/son/source/dummy.d diff --git a/test/new_tests/issue1262-version-inheritance-diamond/source/app.d b/test/issue1262-version-inheritance-diamond/source/app.d similarity index 100% rename from test/new_tests/issue1262-version-inheritance-diamond/source/app.d rename to test/issue1262-version-inheritance-diamond/source/app.d diff --git a/test/new_tests/issue1262-version-inheritance-diamond/test.config b/test/issue1262-version-inheritance-diamond/test.config similarity index 100% rename from test/new_tests/issue1262-version-inheritance-diamond/test.config rename to test/issue1262-version-inheritance-diamond/test.config diff --git a/test/new_tests/issue1262-version-inheritance/.gitignore b/test/issue1262-version-inheritance/.gitignore similarity index 100% rename from test/new_tests/issue1262-version-inheritance/.gitignore rename to test/issue1262-version-inheritance/.gitignore diff --git a/test/new_tests/issue1262-version-inheritance/daughter/dub.sdl b/test/issue1262-version-inheritance/daughter/dub.sdl similarity index 100% rename from test/new_tests/issue1262-version-inheritance/daughter/dub.sdl rename to test/issue1262-version-inheritance/daughter/dub.sdl diff --git a/test/new_tests/issue1262-version-inheritance/daughter/source/dummy.d b/test/issue1262-version-inheritance/daughter/source/dummy.d similarity index 100% rename from test/new_tests/issue1262-version-inheritance/daughter/source/dummy.d rename to test/issue1262-version-inheritance/daughter/source/dummy.d diff --git a/test/new_tests/issue1262-version-inheritance/dub.sdl b/test/issue1262-version-inheritance/dub.sdl similarity index 100% rename from test/new_tests/issue1262-version-inheritance/dub.sdl rename to test/issue1262-version-inheritance/dub.sdl diff --git a/test/new_tests/issue1262-version-inheritance/son/dub.sdl b/test/issue1262-version-inheritance/son/dub.sdl similarity index 100% rename from test/new_tests/issue1262-version-inheritance/son/dub.sdl rename to test/issue1262-version-inheritance/son/dub.sdl diff --git a/test/new_tests/issue1262-version-inheritance/son/source/dummy.d b/test/issue1262-version-inheritance/son/source/dummy.d similarity index 100% rename from test/new_tests/issue1262-version-inheritance/son/source/dummy.d rename to test/issue1262-version-inheritance/son/source/dummy.d diff --git a/test/new_tests/issue1262-version-inheritance/source/app.d b/test/issue1262-version-inheritance/source/app.d similarity index 100% rename from test/new_tests/issue1262-version-inheritance/source/app.d rename to test/issue1262-version-inheritance/source/app.d diff --git a/test/new_tests/issue1262-version-inheritance/test.config b/test/issue1262-version-inheritance/test.config similarity index 100% rename from test/new_tests/issue1262-version-inheritance/test.config rename to test/issue1262-version-inheritance/test.config diff --git a/test/new_tests/issue1277/.gitignore b/test/issue1277/.gitignore similarity index 100% rename from test/new_tests/issue1277/.gitignore rename to test/issue1277/.gitignore diff --git a/test/new_tests/issue1277/dub.json b/test/issue1277/dub.json similarity index 100% rename from test/new_tests/issue1277/dub.json rename to test/issue1277/dub.json diff --git a/test/new_tests/issue1277/sample/source/app.d b/test/issue1277/sample/source/app.d similarity index 100% rename from test/new_tests/issue1277/sample/source/app.d rename to test/issue1277/sample/source/app.d diff --git a/test/new_tests/issue1277/source/app.d b/test/issue1277/source/app.d similarity index 100% rename from test/new_tests/issue1277/source/app.d rename to test/issue1277/source/app.d diff --git "a/test/new_tests/issue130-unicode-\320\241\320\235\320\220\320\257\320\220\320\241\320\242\320\225\320\257\320\205/dub.sdl" "b/test/issue130-unicode-\320\241\320\235\320\220\320\257\320\220\320\241\320\242\320\225\320\257\320\205/dub.sdl" similarity index 100% rename from "test/new_tests/issue130-unicode-\320\241\320\235\320\220\320\257\320\220\320\241\320\242\320\225\320\257\320\205/dub.sdl" rename to "test/issue130-unicode-\320\241\320\235\320\220\320\257\320\220\320\241\320\242\320\225\320\257\320\205/dub.sdl" diff --git "a/test/new_tests/issue130-unicode-\320\241\320\235\320\220\320\257\320\220\320\241\320\242\320\225\320\257\320\205/source/app.d" "b/test/issue130-unicode-\320\241\320\235\320\220\320\257\320\220\320\241\320\242\320\225\320\257\320\205/source/app.d" similarity index 100% rename from "test/new_tests/issue130-unicode-\320\241\320\235\320\220\320\257\320\220\320\241\320\242\320\225\320\257\320\205/source/app.d" rename to "test/issue130-unicode-\320\241\320\235\320\220\320\257\320\220\320\241\320\242\320\225\320\257\320\205/source/app.d" diff --git a/test/new_tests/issue1350-transitive-none-deps/.gitignore b/test/issue1350-transitive-none-deps/.gitignore similarity index 100% rename from test/new_tests/issue1350-transitive-none-deps/.gitignore rename to test/issue1350-transitive-none-deps/.gitignore diff --git a/test/new_tests/issue1350-transitive-none-deps/common-dep/common.d b/test/issue1350-transitive-none-deps/common-dep/common.d similarity index 100% rename from test/new_tests/issue1350-transitive-none-deps/common-dep/common.d rename to test/issue1350-transitive-none-deps/common-dep/common.d diff --git a/test/new_tests/issue1350-transitive-none-deps/common-dep/dub.sdl b/test/issue1350-transitive-none-deps/common-dep/dub.sdl similarity index 100% rename from test/new_tests/issue1350-transitive-none-deps/common-dep/dub.sdl rename to test/issue1350-transitive-none-deps/common-dep/dub.sdl diff --git a/test/new_tests/issue1350-transitive-none-deps/common-none/dub.sdl b/test/issue1350-transitive-none-deps/common-none/dub.sdl similarity index 100% rename from test/new_tests/issue1350-transitive-none-deps/common-none/dub.sdl rename to test/issue1350-transitive-none-deps/common-none/dub.sdl diff --git a/test/new_tests/issue1350-transitive-none-deps/dep1/dep1.d b/test/issue1350-transitive-none-deps/dep1/dep1.d similarity index 100% rename from test/new_tests/issue1350-transitive-none-deps/dep1/dep1.d rename to test/issue1350-transitive-none-deps/dep1/dep1.d diff --git a/test/new_tests/issue1350-transitive-none-deps/dep1/dub.sdl b/test/issue1350-transitive-none-deps/dep1/dub.sdl similarity index 100% rename from test/new_tests/issue1350-transitive-none-deps/dep1/dub.sdl rename to test/issue1350-transitive-none-deps/dep1/dub.sdl diff --git a/test/new_tests/issue1350-transitive-none-deps/dep2/dep2.d b/test/issue1350-transitive-none-deps/dep2/dep2.d similarity index 100% rename from test/new_tests/issue1350-transitive-none-deps/dep2/dep2.d rename to test/issue1350-transitive-none-deps/dep2/dep2.d diff --git a/test/new_tests/issue1350-transitive-none-deps/dep2/dub.sdl b/test/issue1350-transitive-none-deps/dep2/dub.sdl similarity index 100% rename from test/new_tests/issue1350-transitive-none-deps/dep2/dub.sdl rename to test/issue1350-transitive-none-deps/dep2/dub.sdl diff --git a/test/new_tests/issue1350-transitive-none-deps/dub.sdl b/test/issue1350-transitive-none-deps/dub.sdl similarity index 100% rename from test/new_tests/issue1350-transitive-none-deps/dub.sdl rename to test/issue1350-transitive-none-deps/dub.sdl diff --git a/test/new_tests/issue1350-transitive-none-deps/test.config b/test/issue1350-transitive-none-deps/test.config similarity index 100% rename from test/new_tests/issue1350-transitive-none-deps/test.config rename to test/issue1350-transitive-none-deps/test.config diff --git a/test/new_tests/issue1350-transitive-none-deps/test.d b/test/issue1350-transitive-none-deps/test.d similarity index 100% rename from test/new_tests/issue1350-transitive-none-deps/test.d rename to test/issue1350-transitive-none-deps/test.d diff --git a/test/new_tests/issue1372-ignore-files-in-hidden-dirs/.gitignore b/test/issue1372-ignore-files-in-hidden-dirs/.gitignore similarity index 100% rename from test/new_tests/issue1372-ignore-files-in-hidden-dirs/.gitignore rename to test/issue1372-ignore-files-in-hidden-dirs/.gitignore diff --git a/test/new_tests/issue1372-ignore-files-in-hidden-dirs/dub.json b/test/issue1372-ignore-files-in-hidden-dirs/dub.json similarity index 100% rename from test/new_tests/issue1372-ignore-files-in-hidden-dirs/dub.json rename to test/issue1372-ignore-files-in-hidden-dirs/dub.json diff --git a/test/new_tests/issue1372-ignore-files-in-hidden-dirs/sample/.hiddensource/hello.d b/test/issue1372-ignore-files-in-hidden-dirs/sample/.hiddensource/hello.d similarity index 100% rename from test/new_tests/issue1372-ignore-files-in-hidden-dirs/sample/.hiddensource/hello.d rename to test/issue1372-ignore-files-in-hidden-dirs/sample/.hiddensource/hello.d diff --git a/test/new_tests/issue1372-ignore-files-in-hidden-dirs/sample/dub.json b/test/issue1372-ignore-files-in-hidden-dirs/sample/dub.json similarity index 100% rename from test/new_tests/issue1372-ignore-files-in-hidden-dirs/sample/dub.json rename to test/issue1372-ignore-files-in-hidden-dirs/sample/dub.json diff --git a/test/new_tests/issue1372-ignore-files-in-hidden-dirs/sample/source/.AppleDouble/app.d b/test/issue1372-ignore-files-in-hidden-dirs/sample/source/.AppleDouble/app.d similarity index 100% rename from test/new_tests/issue1372-ignore-files-in-hidden-dirs/sample/source/.AppleDouble/app.d rename to test/issue1372-ignore-files-in-hidden-dirs/sample/source/.AppleDouble/app.d diff --git a/test/new_tests/issue1372-ignore-files-in-hidden-dirs/sample/source/.compileMe/hello.d b/test/issue1372-ignore-files-in-hidden-dirs/sample/source/.compileMe/hello.d similarity index 100% rename from test/new_tests/issue1372-ignore-files-in-hidden-dirs/sample/source/.compileMe/hello.d rename to test/issue1372-ignore-files-in-hidden-dirs/sample/source/.compileMe/hello.d diff --git a/test/new_tests/issue1372-ignore-files-in-hidden-dirs/sample/source/app.d b/test/issue1372-ignore-files-in-hidden-dirs/sample/source/app.d similarity index 100% rename from test/new_tests/issue1372-ignore-files-in-hidden-dirs/sample/source/app.d rename to test/issue1372-ignore-files-in-hidden-dirs/sample/source/app.d diff --git a/test/new_tests/issue1372-ignore-files-in-hidden-dirs/source/app.d b/test/issue1372-ignore-files-in-hidden-dirs/source/app.d similarity index 100% rename from test/new_tests/issue1372-ignore-files-in-hidden-dirs/source/app.d rename to test/issue1372-ignore-files-in-hidden-dirs/source/app.d diff --git a/test/new_tests/issue1396-pre-post-run-commands/.gitignore b/test/issue1396-pre-post-run-commands/.gitignore similarity index 100% rename from test/new_tests/issue1396-pre-post-run-commands/.gitignore rename to test/issue1396-pre-post-run-commands/.gitignore diff --git a/test/new_tests/issue1396-pre-post-run-commands/dub.json b/test/issue1396-pre-post-run-commands/dub.json similarity index 100% rename from test/new_tests/issue1396-pre-post-run-commands/dub.json rename to test/issue1396-pre-post-run-commands/dub.json diff --git a/test/new_tests/issue1396-pre-post-run-commands/sample/dub.sdl b/test/issue1396-pre-post-run-commands/sample/dub.sdl similarity index 100% rename from test/new_tests/issue1396-pre-post-run-commands/sample/dub.sdl rename to test/issue1396-pre-post-run-commands/sample/dub.sdl diff --git a/test/new_tests/issue1396-pre-post-run-commands/sample/post-run.sh b/test/issue1396-pre-post-run-commands/sample/post-run.sh similarity index 100% rename from test/new_tests/issue1396-pre-post-run-commands/sample/post-run.sh rename to test/issue1396-pre-post-run-commands/sample/post-run.sh diff --git a/test/new_tests/issue1396-pre-post-run-commands/sample/source/app.d b/test/issue1396-pre-post-run-commands/sample/source/app.d similarity index 100% rename from test/new_tests/issue1396-pre-post-run-commands/sample/source/app.d rename to test/issue1396-pre-post-run-commands/sample/source/app.d diff --git a/test/new_tests/issue1396-pre-post-run-commands/source/app.d b/test/issue1396-pre-post-run-commands/source/app.d similarity index 100% rename from test/new_tests/issue1396-pre-post-run-commands/source/app.d rename to test/issue1396-pre-post-run-commands/source/app.d diff --git a/test/new_tests/issue1396-pre-post-run-commands/test.config b/test/issue1396-pre-post-run-commands/test.config similarity index 100% rename from test/new_tests/issue1396-pre-post-run-commands/test.config rename to test/issue1396-pre-post-run-commands/test.config diff --git a/test/new_tests/issue1401-file-system-pkg-supplier/.gitignore b/test/issue1401-file-system-pkg-supplier/.gitignore similarity index 100% rename from test/new_tests/issue1401-file-system-pkg-supplier/.gitignore rename to test/issue1401-file-system-pkg-supplier/.gitignore diff --git a/test/new_tests/issue1401-file-system-pkg-supplier/dub.json b/test/issue1401-file-system-pkg-supplier/dub.json similarity index 100% rename from test/new_tests/issue1401-file-system-pkg-supplier/dub.json rename to test/issue1401-file-system-pkg-supplier/dub.json diff --git a/test/new_tests/issue1401-file-system-pkg-supplier/sample/fs-json-dubpackage-1.0.7.zip b/test/issue1401-file-system-pkg-supplier/sample/fs-json-dubpackage-1.0.7.zip similarity index 100% rename from test/new_tests/issue1401-file-system-pkg-supplier/sample/fs-json-dubpackage-1.0.7.zip rename to test/issue1401-file-system-pkg-supplier/sample/fs-json-dubpackage-1.0.7.zip diff --git a/test/new_tests/issue1401-file-system-pkg-supplier/sample/fs-sdl-dubpackage-1.0.5.zip b/test/issue1401-file-system-pkg-supplier/sample/fs-sdl-dubpackage-1.0.5.zip similarity index 100% rename from test/new_tests/issue1401-file-system-pkg-supplier/sample/fs-sdl-dubpackage-1.0.5.zip rename to test/issue1401-file-system-pkg-supplier/sample/fs-sdl-dubpackage-1.0.5.zip diff --git a/test/new_tests/issue1401-file-system-pkg-supplier/sample/fs-sdl-dubpackage-1.0.6.zip b/test/issue1401-file-system-pkg-supplier/sample/fs-sdl-dubpackage-1.0.6.zip similarity index 100% rename from test/new_tests/issue1401-file-system-pkg-supplier/sample/fs-sdl-dubpackage-1.0.6.zip rename to test/issue1401-file-system-pkg-supplier/sample/fs-sdl-dubpackage-1.0.6.zip diff --git a/test/new_tests/issue1401-file-system-pkg-supplier/source/app.d b/test/issue1401-file-system-pkg-supplier/source/app.d similarity index 100% rename from test/new_tests/issue1401-file-system-pkg-supplier/source/app.d rename to test/issue1401-file-system-pkg-supplier/source/app.d diff --git a/test/new_tests/issue1408-inherit-linker-files/.gitignore b/test/issue1408-inherit-linker-files/.gitignore similarity index 100% rename from test/new_tests/issue1408-inherit-linker-files/.gitignore rename to test/issue1408-inherit-linker-files/.gitignore diff --git a/test/new_tests/issue1408-inherit-linker-files/dep.d b/test/issue1408-inherit-linker-files/dep.d similarity index 100% rename from test/new_tests/issue1408-inherit-linker-files/dep.d rename to test/issue1408-inherit-linker-files/dep.d diff --git a/test/new_tests/issue1408-inherit-linker-files/dub.sdl b/test/issue1408-inherit-linker-files/dub.sdl similarity index 100% rename from test/new_tests/issue1408-inherit-linker-files/dub.sdl rename to test/issue1408-inherit-linker-files/dub.sdl diff --git a/test/new_tests/issue1408-inherit-linker-files/lib.d b/test/issue1408-inherit-linker-files/lib.d similarity index 100% rename from test/new_tests/issue1408-inherit-linker-files/lib.d rename to test/issue1408-inherit-linker-files/lib.d diff --git a/test/new_tests/issue1408-inherit-linker-files/lib/dub.sdl b/test/issue1408-inherit-linker-files/lib/dub.sdl similarity index 100% rename from test/new_tests/issue1408-inherit-linker-files/lib/dub.sdl rename to test/issue1408-inherit-linker-files/lib/dub.sdl diff --git a/test/new_tests/issue1408-inherit-linker-files/lib/lib.d b/test/issue1408-inherit-linker-files/lib/lib.d similarity index 100% rename from test/new_tests/issue1408-inherit-linker-files/lib/lib.d rename to test/issue1408-inherit-linker-files/lib/lib.d diff --git a/test/new_tests/issue1408-inherit-linker-files/main.d b/test/issue1408-inherit-linker-files/main.d similarity index 100% rename from test/new_tests/issue1408-inherit-linker-files/main.d rename to test/issue1408-inherit-linker-files/main.d diff --git a/test/new_tests/issue1408-inherit-linker-files/test.config b/test/issue1408-inherit-linker-files/test.config similarity index 100% rename from test/new_tests/issue1408-inherit-linker-files/test.config rename to test/issue1408-inherit-linker-files/test.config diff --git a/test/new_tests/issue1416-maven-repo-pkg-supplier/dub.json b/test/issue1416-maven-repo-pkg-supplier/dub.json similarity index 100% rename from test/new_tests/issue1416-maven-repo-pkg-supplier/dub.json rename to test/issue1416-maven-repo-pkg-supplier/dub.json diff --git a/test/new_tests/issue1416-maven-repo-pkg-supplier/source/app.d b/test/issue1416-maven-repo-pkg-supplier/source/app.d similarity index 100% rename from test/new_tests/issue1416-maven-repo-pkg-supplier/source/app.d rename to test/issue1416-maven-repo-pkg-supplier/source/app.d diff --git a/test/new_tests/issue1416-maven-repo-pkg-supplier/test.config b/test/issue1416-maven-repo-pkg-supplier/test.config similarity index 100% rename from test/new_tests/issue1416-maven-repo-pkg-supplier/test.config rename to test/issue1416-maven-repo-pkg-supplier/test.config diff --git a/test/new_tests/issue1427-betterC/dub.json b/test/issue1427-betterC/dub.json similarity index 100% rename from test/new_tests/issue1427-betterC/dub.json rename to test/issue1427-betterC/dub.json diff --git a/test/new_tests/issue1427-betterC/source/app.d b/test/issue1427-betterC/source/app.d similarity index 100% rename from test/new_tests/issue1427-betterC/source/app.d rename to test/issue1427-betterC/source/app.d diff --git a/test/new_tests/issue1447-build-settings-vars/.gitignore b/test/issue1447-build-settings-vars/.gitignore similarity index 100% rename from test/new_tests/issue1447-build-settings-vars/.gitignore rename to test/issue1447-build-settings-vars/.gitignore diff --git a/test/new_tests/issue1447-build-settings-vars/dub.json b/test/issue1447-build-settings-vars/dub.json similarity index 100% rename from test/new_tests/issue1447-build-settings-vars/dub.json rename to test/issue1447-build-settings-vars/dub.json diff --git a/test/new_tests/issue1447-build-settings-vars/sample/dub.json b/test/issue1447-build-settings-vars/sample/dub.json similarity index 100% rename from test/new_tests/issue1447-build-settings-vars/sample/dub.json rename to test/issue1447-build-settings-vars/sample/dub.json diff --git a/test/new_tests/issue1447-build-settings-vars/sample/source/app.d b/test/issue1447-build-settings-vars/sample/source/app.d similarity index 100% rename from test/new_tests/issue1447-build-settings-vars/sample/source/app.d rename to test/issue1447-build-settings-vars/sample/source/app.d diff --git a/test/new_tests/issue1447-build-settings-vars/sample/view-aarch64/arch b/test/issue1447-build-settings-vars/sample/view-aarch64/arch similarity index 100% rename from test/new_tests/issue1447-build-settings-vars/sample/view-aarch64/arch rename to test/issue1447-build-settings-vars/sample/view-aarch64/arch diff --git a/test/new_tests/issue1447-build-settings-vars/sample/view-x86/arch b/test/issue1447-build-settings-vars/sample/view-x86/arch similarity index 100% rename from test/new_tests/issue1447-build-settings-vars/sample/view-x86/arch rename to test/issue1447-build-settings-vars/sample/view-x86/arch diff --git a/test/new_tests/issue1447-build-settings-vars/sample/view-x86_64/arch b/test/issue1447-build-settings-vars/sample/view-x86_64/arch similarity index 100% rename from test/new_tests/issue1447-build-settings-vars/sample/view-x86_64/arch rename to test/issue1447-build-settings-vars/sample/view-x86_64/arch diff --git a/test/new_tests/issue1447-build-settings-vars/source/app.d b/test/issue1447-build-settings-vars/source/app.d similarity index 100% rename from test/new_tests/issue1447-build-settings-vars/source/app.d rename to test/issue1447-build-settings-vars/source/app.d diff --git a/test/new_tests/issue1447-build-settings-vars/test.config b/test/issue1447-build-settings-vars/test.config similarity index 100% rename from test/new_tests/issue1447-build-settings-vars/test.config rename to test/issue1447-build-settings-vars/test.config diff --git a/test/new_tests/issue1474-generate-source/.gitignore b/test/issue1474-generate-source/.gitignore similarity index 100% rename from test/new_tests/issue1474-generate-source/.gitignore rename to test/issue1474-generate-source/.gitignore diff --git a/test/new_tests/issue1474-generate-source/dub.json b/test/issue1474-generate-source/dub.json similarity index 100% rename from test/new_tests/issue1474-generate-source/dub.json rename to test/issue1474-generate-source/dub.json diff --git a/test/new_tests/issue1474-generate-source/sample/dub.json b/test/issue1474-generate-source/sample/dub.json similarity index 100% rename from test/new_tests/issue1474-generate-source/sample/dub.json rename to test/issue1474-generate-source/sample/dub.json diff --git a/test/new_tests/issue1474-generate-source/sample/ext/kekw.d b/test/issue1474-generate-source/sample/ext/kekw.d similarity index 100% rename from test/new_tests/issue1474-generate-source/sample/ext/kekw.d rename to test/issue1474-generate-source/sample/ext/kekw.d diff --git a/test/new_tests/issue1474-generate-source/sample/source/app.d b/test/issue1474-generate-source/sample/source/app.d similarity index 100% rename from test/new_tests/issue1474-generate-source/sample/source/app.d rename to test/issue1474-generate-source/sample/source/app.d diff --git a/test/new_tests/issue1474-generate-source/source/app.d b/test/issue1474-generate-source/source/app.d similarity index 100% rename from test/new_tests/issue1474-generate-source/source/app.d rename to test/issue1474-generate-source/source/app.d diff --git a/test/new_tests/issue1477-subpackage-visuald-paths/.gitignore b/test/issue1477-subpackage-visuald-paths/.gitignore similarity index 100% rename from test/new_tests/issue1477-subpackage-visuald-paths/.gitignore rename to test/issue1477-subpackage-visuald-paths/.gitignore diff --git a/test/new_tests/issue1477-subpackage-visuald-paths/dub.json b/test/issue1477-subpackage-visuald-paths/dub.json similarity index 100% rename from test/new_tests/issue1477-subpackage-visuald-paths/dub.json rename to test/issue1477-subpackage-visuald-paths/dub.json diff --git a/test/new_tests/issue1477-subpackage-visuald-paths/sample/dub.sdl b/test/issue1477-subpackage-visuald-paths/sample/dub.sdl similarity index 100% rename from test/new_tests/issue1477-subpackage-visuald-paths/sample/dub.sdl rename to test/issue1477-subpackage-visuald-paths/sample/dub.sdl diff --git a/test/new_tests/issue1477-subpackage-visuald-paths/sample/source/library.d b/test/issue1477-subpackage-visuald-paths/sample/source/library.d similarity index 100% rename from test/new_tests/issue1477-subpackage-visuald-paths/sample/source/library.d rename to test/issue1477-subpackage-visuald-paths/sample/source/library.d diff --git a/test/new_tests/issue1477-subpackage-visuald-paths/sample/sub/subpackage_a/dub.sdl b/test/issue1477-subpackage-visuald-paths/sample/sub/subpackage_a/dub.sdl similarity index 100% rename from test/new_tests/issue1477-subpackage-visuald-paths/sample/sub/subpackage_a/dub.sdl rename to test/issue1477-subpackage-visuald-paths/sample/sub/subpackage_a/dub.sdl diff --git a/test/new_tests/issue1477-subpackage-visuald-paths/sample/sub/subpackage_a/source/subpackage_a.d b/test/issue1477-subpackage-visuald-paths/sample/sub/subpackage_a/source/subpackage_a.d similarity index 100% rename from test/new_tests/issue1477-subpackage-visuald-paths/sample/sub/subpackage_a/source/subpackage_a.d rename to test/issue1477-subpackage-visuald-paths/sample/sub/subpackage_a/source/subpackage_a.d diff --git a/test/new_tests/issue1477-subpackage-visuald-paths/source/app.d b/test/issue1477-subpackage-visuald-paths/source/app.d similarity index 100% rename from test/new_tests/issue1477-subpackage-visuald-paths/source/app.d rename to test/issue1477-subpackage-visuald-paths/source/app.d diff --git a/test/new_tests/issue1504-envvar-in-path/.gitignore b/test/issue1504-envvar-in-path/.gitignore similarity index 100% rename from test/new_tests/issue1504-envvar-in-path/.gitignore rename to test/issue1504-envvar-in-path/.gitignore diff --git a/test/new_tests/issue1504-envvar-in-path/dub.json b/test/issue1504-envvar-in-path/dub.json similarity index 100% rename from test/new_tests/issue1504-envvar-in-path/dub.json rename to test/issue1504-envvar-in-path/dub.json diff --git a/test/new_tests/issue1504-envvar-in-path/sample/dub.json b/test/issue1504-envvar-in-path/sample/dub.json similarity index 100% rename from test/new_tests/issue1504-envvar-in-path/sample/dub.json rename to test/issue1504-envvar-in-path/sample/dub.json diff --git a/test/new_tests/issue1504-envvar-in-path/sample/source/app.d b/test/issue1504-envvar-in-path/sample/source/app.d similarity index 100% rename from test/new_tests/issue1504-envvar-in-path/sample/source/app.d rename to test/issue1504-envvar-in-path/sample/source/app.d diff --git a/test/new_tests/issue1504-envvar-in-path/sample/teststrings/message.txt b/test/issue1504-envvar-in-path/sample/teststrings/message.txt similarity index 100% rename from test/new_tests/issue1504-envvar-in-path/sample/teststrings/message.txt rename to test/issue1504-envvar-in-path/sample/teststrings/message.txt diff --git a/test/new_tests/issue1504-envvar-in-path/source/app.d b/test/issue1504-envvar-in-path/source/app.d similarity index 100% rename from test/new_tests/issue1504-envvar-in-path/source/app.d rename to test/issue1504-envvar-in-path/source/app.d diff --git a/test/new_tests/issue1505-single-file-package-dynamic-library/.gitignore b/test/issue1505-single-file-package-dynamic-library/.gitignore similarity index 100% rename from test/new_tests/issue1505-single-file-package-dynamic-library/.gitignore rename to test/issue1505-single-file-package-dynamic-library/.gitignore diff --git a/test/new_tests/issue1505-single-file-package-dynamic-library/dub.json b/test/issue1505-single-file-package-dynamic-library/dub.json similarity index 100% rename from test/new_tests/issue1505-single-file-package-dynamic-library/dub.json rename to test/issue1505-single-file-package-dynamic-library/dub.json diff --git a/test/new_tests/issue1505-single-file-package-dynamic-library/sample.d b/test/issue1505-single-file-package-dynamic-library/sample.d similarity index 100% rename from test/new_tests/issue1505-single-file-package-dynamic-library/sample.d rename to test/issue1505-single-file-package-dynamic-library/sample.d diff --git a/test/new_tests/issue1505-single-file-package-dynamic-library/source/app.d b/test/issue1505-single-file-package-dynamic-library/source/app.d similarity index 100% rename from test/new_tests/issue1505-single-file-package-dynamic-library/source/app.d rename to test/issue1505-single-file-package-dynamic-library/source/app.d diff --git a/test/new_tests/issue1524-maven-upgrade-dependency-tree/.gitignore b/test/issue1524-maven-upgrade-dependency-tree/.gitignore similarity index 100% rename from test/new_tests/issue1524-maven-upgrade-dependency-tree/.gitignore rename to test/issue1524-maven-upgrade-dependency-tree/.gitignore diff --git a/test/new_tests/issue1524-maven-upgrade-dependency-tree/dub.json b/test/issue1524-maven-upgrade-dependency-tree/dub.json similarity index 100% rename from test/new_tests/issue1524-maven-upgrade-dependency-tree/dub.json rename to test/issue1524-maven-upgrade-dependency-tree/dub.json diff --git a/test/new_tests/issue1524-maven-upgrade-dependency-tree/sample/dub.json b/test/issue1524-maven-upgrade-dependency-tree/sample/dub.json similarity index 100% rename from test/new_tests/issue1524-maven-upgrade-dependency-tree/sample/dub.json rename to test/issue1524-maven-upgrade-dependency-tree/sample/dub.json diff --git a/test/new_tests/issue1524-maven-upgrade-dependency-tree/sample/maven/release/dubpackages/maven-dubpackage-a/1.0.5/maven-dubpackage-a-1.0.5.zip b/test/issue1524-maven-upgrade-dependency-tree/sample/maven/release/dubpackages/maven-dubpackage-a/1.0.5/maven-dubpackage-a-1.0.5.zip similarity index 100% rename from test/new_tests/issue1524-maven-upgrade-dependency-tree/sample/maven/release/dubpackages/maven-dubpackage-a/1.0.5/maven-dubpackage-a-1.0.5.zip rename to test/issue1524-maven-upgrade-dependency-tree/sample/maven/release/dubpackages/maven-dubpackage-a/1.0.5/maven-dubpackage-a-1.0.5.zip diff --git a/test/new_tests/issue1524-maven-upgrade-dependency-tree/sample/maven/release/dubpackages/maven-dubpackage-a/maven-metadata.xml b/test/issue1524-maven-upgrade-dependency-tree/sample/maven/release/dubpackages/maven-dubpackage-a/maven-metadata.xml similarity index 100% rename from test/new_tests/issue1524-maven-upgrade-dependency-tree/sample/maven/release/dubpackages/maven-dubpackage-a/maven-metadata.xml rename to test/issue1524-maven-upgrade-dependency-tree/sample/maven/release/dubpackages/maven-dubpackage-a/maven-metadata.xml diff --git a/test/new_tests/issue1524-maven-upgrade-dependency-tree/sample/maven/release/dubpackages/maven-dubpackage-b/1.0.6/maven-dubpackage-b-1.0.6.zip b/test/issue1524-maven-upgrade-dependency-tree/sample/maven/release/dubpackages/maven-dubpackage-b/1.0.6/maven-dubpackage-b-1.0.6.zip similarity index 100% rename from test/new_tests/issue1524-maven-upgrade-dependency-tree/sample/maven/release/dubpackages/maven-dubpackage-b/1.0.6/maven-dubpackage-b-1.0.6.zip rename to test/issue1524-maven-upgrade-dependency-tree/sample/maven/release/dubpackages/maven-dubpackage-b/1.0.6/maven-dubpackage-b-1.0.6.zip diff --git a/test/new_tests/issue1524-maven-upgrade-dependency-tree/sample/maven/release/dubpackages/maven-dubpackage-b/maven-metadata.xml b/test/issue1524-maven-upgrade-dependency-tree/sample/maven/release/dubpackages/maven-dubpackage-b/maven-metadata.xml similarity index 100% rename from test/new_tests/issue1524-maven-upgrade-dependency-tree/sample/maven/release/dubpackages/maven-dubpackage-b/maven-metadata.xml rename to test/issue1524-maven-upgrade-dependency-tree/sample/maven/release/dubpackages/maven-dubpackage-b/maven-metadata.xml diff --git a/test/new_tests/issue1524-maven-upgrade-dependency-tree/sample/source/app.d b/test/issue1524-maven-upgrade-dependency-tree/sample/source/app.d similarity index 100% rename from test/new_tests/issue1524-maven-upgrade-dependency-tree/sample/source/app.d rename to test/issue1524-maven-upgrade-dependency-tree/sample/source/app.d diff --git a/test/new_tests/issue1524-maven-upgrade-dependency-tree/source/app.d b/test/issue1524-maven-upgrade-dependency-tree/source/app.d similarity index 100% rename from test/new_tests/issue1524-maven-upgrade-dependency-tree/source/app.d rename to test/issue1524-maven-upgrade-dependency-tree/source/app.d diff --git a/test/new_tests/issue1524-maven-upgrade-dependency-tree/test.config b/test/issue1524-maven-upgrade-dependency-tree/test.config similarity index 100% rename from test/new_tests/issue1524-maven-upgrade-dependency-tree/test.config rename to test/issue1524-maven-upgrade-dependency-tree/test.config diff --git a/test/new_tests/issue1531-toolchain-requirements/dub.json b/test/issue1531-toolchain-requirements/dub.json similarity index 100% rename from test/new_tests/issue1531-toolchain-requirements/dub.json rename to test/issue1531-toolchain-requirements/dub.json diff --git a/test/new_tests/issue1531-toolchain-requirements/source/app.d b/test/issue1531-toolchain-requirements/source/app.d similarity index 100% rename from test/new_tests/issue1531-toolchain-requirements/source/app.d rename to test/issue1531-toolchain-requirements/source/app.d diff --git a/test/new_tests/issue1551-var-escaping/dub.json b/test/issue1551-var-escaping/dub.json similarity index 100% rename from test/new_tests/issue1551-var-escaping/dub.json rename to test/issue1551-var-escaping/dub.json diff --git a/test/new_tests/issue1551-var-escaping/source/app.d b/test/issue1551-var-escaping/source/app.d similarity index 100% rename from test/new_tests/issue1551-var-escaping/source/app.d rename to test/issue1551-var-escaping/source/app.d diff --git a/test/new_tests/issue1556-fetch-and-build/.gitignore b/test/issue1556-fetch-and-build/.gitignore similarity index 100% rename from test/new_tests/issue1556-fetch-and-build/.gitignore rename to test/issue1556-fetch-and-build/.gitignore diff --git a/test/new_tests/issue1556-fetch-and-build/dub.json b/test/issue1556-fetch-and-build/dub.json similarity index 100% rename from test/new_tests/issue1556-fetch-and-build/dub.json rename to test/issue1556-fetch-and-build/dub.json diff --git a/test/new_tests/issue1556-fetch-and-build/sample/dependency-package-1.0.0.zip b/test/issue1556-fetch-and-build/sample/dependency-package-1.0.0.zip similarity index 100% rename from test/new_tests/issue1556-fetch-and-build/sample/dependency-package-1.0.0.zip rename to test/issue1556-fetch-and-build/sample/dependency-package-1.0.0.zip diff --git a/test/new_tests/issue1556-fetch-and-build/sample/main-package-1.0.0.zip b/test/issue1556-fetch-and-build/sample/main-package-1.0.0.zip similarity index 100% rename from test/new_tests/issue1556-fetch-and-build/sample/main-package-1.0.0.zip rename to test/issue1556-fetch-and-build/sample/main-package-1.0.0.zip diff --git a/test/new_tests/issue1556-fetch-and-build/source/app.d b/test/issue1556-fetch-and-build/source/app.d similarity index 100% rename from test/new_tests/issue1556-fetch-and-build/source/app.d rename to test/issue1556-fetch-and-build/source/app.d diff --git a/test/new_tests/issue1567-fetch-sub-package/.gitignore b/test/issue1567-fetch-sub-package/.gitignore similarity index 100% rename from test/new_tests/issue1567-fetch-sub-package/.gitignore rename to test/issue1567-fetch-sub-package/.gitignore diff --git a/test/new_tests/issue1567-fetch-sub-package/dub.json b/test/issue1567-fetch-sub-package/dub.json similarity index 100% rename from test/new_tests/issue1567-fetch-sub-package/dub.json rename to test/issue1567-fetch-sub-package/dub.json diff --git a/test/new_tests/issue1567-fetch-sub-package/sample/fetch-sub-package-dubpackage-1.0.1.zip b/test/issue1567-fetch-sub-package/sample/fetch-sub-package-dubpackage-1.0.1.zip similarity index 100% rename from test/new_tests/issue1567-fetch-sub-package/sample/fetch-sub-package-dubpackage-1.0.1.zip rename to test/issue1567-fetch-sub-package/sample/fetch-sub-package-dubpackage-1.0.1.zip diff --git a/test/new_tests/issue1567-fetch-sub-package/source/app.d b/test/issue1567-fetch-sub-package/source/app.d similarity index 100% rename from test/new_tests/issue1567-fetch-sub-package/source/app.d rename to test/issue1567-fetch-sub-package/source/app.d diff --git a/test/new_tests/issue1574-addcommand/dub.json b/test/issue1574-addcommand/dub.json similarity index 100% rename from test/new_tests/issue1574-addcommand/dub.json rename to test/issue1574-addcommand/dub.json diff --git a/test/new_tests/issue1574-addcommand/source/app.d b/test/issue1574-addcommand/source/app.d similarity index 100% rename from test/new_tests/issue1574-addcommand/source/app.d rename to test/issue1574-addcommand/source/app.d diff --git a/test/new_tests/issue1574-addcommand/test.config b/test/issue1574-addcommand/test.config similarity index 100% rename from test/new_tests/issue1574-addcommand/test.config rename to test/issue1574-addcommand/test.config diff --git a/test/new_tests/issue1636-betterC-dub-test/.gitignore b/test/issue1636-betterC-dub-test/.gitignore similarity index 100% rename from test/new_tests/issue1636-betterC-dub-test/.gitignore rename to test/issue1636-betterC-dub-test/.gitignore diff --git a/test/new_tests/issue1636-betterC-dub-test/dub.json b/test/issue1636-betterC-dub-test/dub.json similarity index 100% rename from test/new_tests/issue1636-betterC-dub-test/dub.json rename to test/issue1636-betterC-dub-test/dub.json diff --git a/test/new_tests/issue1636-betterC-dub-test/sample/dub.json b/test/issue1636-betterC-dub-test/sample/dub.json similarity index 100% rename from test/new_tests/issue1636-betterC-dub-test/sample/dub.json rename to test/issue1636-betterC-dub-test/sample/dub.json diff --git a/test/new_tests/issue1636-betterC-dub-test/sample/source/lib.d b/test/issue1636-betterC-dub-test/sample/source/lib.d similarity index 100% rename from test/new_tests/issue1636-betterC-dub-test/sample/source/lib.d rename to test/issue1636-betterC-dub-test/sample/source/lib.d diff --git a/test/new_tests/issue1636-betterC-dub-test/source/app.d b/test/issue1636-betterC-dub-test/source/app.d similarity index 100% rename from test/new_tests/issue1636-betterC-dub-test/source/app.d rename to test/issue1636-betterC-dub-test/source/app.d diff --git a/test/new_tests/issue1645-dflags-build/dub.json b/test/issue1645-dflags-build/dub.json similarity index 100% rename from test/new_tests/issue1645-dflags-build/dub.json rename to test/issue1645-dflags-build/dub.json diff --git a/test/new_tests/issue1645-dflags-build/source/app.d b/test/issue1645-dflags-build/source/app.d similarity index 100% rename from test/new_tests/issue1645-dflags-build/source/app.d rename to test/issue1645-dflags-build/source/app.d diff --git a/test/new_tests/issue1645-dflags-build/test.config b/test/issue1645-dflags-build/test.config similarity index 100% rename from test/new_tests/issue1645-dflags-build/test.config rename to test/issue1645-dflags-build/test.config diff --git a/test/new_tests/issue1651-custom-dub-init-type/.gitignore b/test/issue1651-custom-dub-init-type/.gitignore similarity index 100% rename from test/new_tests/issue1651-custom-dub-init-type/.gitignore rename to test/issue1651-custom-dub-init-type/.gitignore diff --git a/test/new_tests/issue1651-custom-dub-init-type/dub.json b/test/issue1651-custom-dub-init-type/dub.json similarity index 100% rename from test/new_tests/issue1651-custom-dub-init-type/dub.json rename to test/issue1651-custom-dub-init-type/dub.json diff --git a/test/new_tests/issue1651-custom-dub-init-type/sample/custom-dub-init-dubpackage-1.0.1.zip b/test/issue1651-custom-dub-init-type/sample/custom-dub-init-dubpackage-1.0.1.zip similarity index 100% rename from test/new_tests/issue1651-custom-dub-init-type/sample/custom-dub-init-dubpackage-1.0.1.zip rename to test/issue1651-custom-dub-init-type/sample/custom-dub-init-dubpackage-1.0.1.zip diff --git a/test/new_tests/issue1651-custom-dub-init-type/source/app.d b/test/issue1651-custom-dub-init-type/source/app.d similarity index 100% rename from test/new_tests/issue1651-custom-dub-init-type/source/app.d rename to test/issue1651-custom-dub-init-type/source/app.d diff --git a/test/new_tests/issue1691-build-subpkg/.gitignore b/test/issue1691-build-subpkg/.gitignore similarity index 100% rename from test/new_tests/issue1691-build-subpkg/.gitignore rename to test/issue1691-build-subpkg/.gitignore diff --git a/test/new_tests/issue1691-build-subpkg/dub.json b/test/issue1691-build-subpkg/dub.json similarity index 100% rename from test/new_tests/issue1691-build-subpkg/dub.json rename to test/issue1691-build-subpkg/dub.json diff --git a/test/new_tests/issue1691-build-subpkg/sample/dub.sdl b/test/issue1691-build-subpkg/sample/dub.sdl similarity index 100% rename from test/new_tests/issue1691-build-subpkg/sample/dub.sdl rename to test/issue1691-build-subpkg/sample/dub.sdl diff --git a/test/new_tests/issue1691-build-subpkg/sample/source/app.d b/test/issue1691-build-subpkg/sample/source/app.d similarity index 100% rename from test/new_tests/issue1691-build-subpkg/sample/source/app.d rename to test/issue1691-build-subpkg/sample/source/app.d diff --git a/test/new_tests/issue1691-build-subpkg/sample/subpkg/dub.sdl b/test/issue1691-build-subpkg/sample/subpkg/dub.sdl similarity index 100% rename from test/new_tests/issue1691-build-subpkg/sample/subpkg/dub.sdl rename to test/issue1691-build-subpkg/sample/subpkg/dub.sdl diff --git a/test/new_tests/issue1691-build-subpkg/sample/subpkg/source/subpkg.d b/test/issue1691-build-subpkg/sample/subpkg/source/subpkg.d similarity index 100% rename from test/new_tests/issue1691-build-subpkg/sample/subpkg/source/subpkg.d rename to test/issue1691-build-subpkg/sample/subpkg/source/subpkg.d diff --git a/test/new_tests/issue1691-build-subpkg/source/app.d b/test/issue1691-build-subpkg/source/app.d similarity index 100% rename from test/new_tests/issue1691-build-subpkg/source/app.d rename to test/issue1691-build-subpkg/source/app.d diff --git a/test/new_tests/issue1739-project-settings-file/.gitignore b/test/issue1739-project-settings-file/.gitignore similarity index 100% rename from test/new_tests/issue1739-project-settings-file/.gitignore rename to test/issue1739-project-settings-file/.gitignore diff --git a/test/new_tests/issue1739-project-settings-file/dub.json b/test/issue1739-project-settings-file/dub.json similarity index 100% rename from test/new_tests/issue1739-project-settings-file/dub.json rename to test/issue1739-project-settings-file/dub.json diff --git a/test/new_tests/issue1739-project-settings-file/sample/single.d b/test/issue1739-project-settings-file/sample/single.d similarity index 100% rename from test/new_tests/issue1739-project-settings-file/sample/single.d rename to test/issue1739-project-settings-file/sample/single.d diff --git a/test/new_tests/issue1739-project-settings-file/source/app.d b/test/issue1739-project-settings-file/source/app.d similarity index 100% rename from test/new_tests/issue1739-project-settings-file/source/app.d rename to test/issue1739-project-settings-file/source/app.d diff --git a/test/new_tests/issue1773-lint/.gitignore b/test/issue1773-lint/.gitignore similarity index 100% rename from test/new_tests/issue1773-lint/.gitignore rename to test/issue1773-lint/.gitignore diff --git a/test/new_tests/issue1773-lint/dub.json b/test/issue1773-lint/dub.json similarity index 100% rename from test/new_tests/issue1773-lint/dub.json rename to test/issue1773-lint/dub.json diff --git a/test/new_tests/issue1773-lint/sample/dub.json b/test/issue1773-lint/sample/dub.json similarity index 100% rename from test/new_tests/issue1773-lint/sample/dub.json rename to test/issue1773-lint/sample/dub.json diff --git a/test/new_tests/issue1773-lint/sample/source/app.d b/test/issue1773-lint/sample/source/app.d similarity index 100% rename from test/new_tests/issue1773-lint/sample/source/app.d rename to test/issue1773-lint/sample/source/app.d diff --git a/test/new_tests/issue1773-lint/source/app.d b/test/issue1773-lint/source/app.d similarity index 100% rename from test/new_tests/issue1773-lint/source/app.d rename to test/issue1773-lint/source/app.d diff --git a/test/new_tests/issue1775/.gitignore b/test/issue1775/.gitignore similarity index 100% rename from test/new_tests/issue1775/.gitignore rename to test/issue1775/.gitignore diff --git a/test/new_tests/issue1775/dub.json b/test/issue1775/dub.json similarity index 100% rename from test/new_tests/issue1775/dub.json rename to test/issue1775/dub.json diff --git a/test/new_tests/issue1775/issue1775.marker b/test/issue1775/issue1775.marker similarity index 100% rename from test/new_tests/issue1775/issue1775.marker rename to test/issue1775/issue1775.marker diff --git a/test/new_tests/issue1775/source/app.d b/test/issue1775/source/app.d similarity index 100% rename from test/new_tests/issue1775/source/app.d rename to test/issue1775/source/app.d diff --git a/test/new_tests/issue1788-incomplete-string-import-override/.gitignore b/test/issue1788-incomplete-string-import-override/.gitignore similarity index 100% rename from test/new_tests/issue1788-incomplete-string-import-override/.gitignore rename to test/issue1788-incomplete-string-import-override/.gitignore diff --git a/test/new_tests/issue1788-incomplete-string-import-override/b/dub.sdl b/test/issue1788-incomplete-string-import-override/b/dub.sdl similarity index 100% rename from test/new_tests/issue1788-incomplete-string-import-override/b/dub.sdl rename to test/issue1788-incomplete-string-import-override/b/dub.sdl diff --git a/test/new_tests/issue1788-incomplete-string-import-override/b/source/b/foo.d b/test/issue1788-incomplete-string-import-override/b/source/b/foo.d similarity index 100% rename from test/new_tests/issue1788-incomplete-string-import-override/b/source/b/foo.d rename to test/issue1788-incomplete-string-import-override/b/source/b/foo.d diff --git a/test/new_tests/issue1788-incomplete-string-import-override/b/views/layout.diet b/test/issue1788-incomplete-string-import-override/b/views/layout.diet similarity index 100% rename from test/new_tests/issue1788-incomplete-string-import-override/b/views/layout.diet rename to test/issue1788-incomplete-string-import-override/b/views/layout.diet diff --git a/test/new_tests/issue1788-incomplete-string-import-override/c/dub.sdl b/test/issue1788-incomplete-string-import-override/c/dub.sdl similarity index 100% rename from test/new_tests/issue1788-incomplete-string-import-override/c/dub.sdl rename to test/issue1788-incomplete-string-import-override/c/dub.sdl diff --git a/test/new_tests/issue1788-incomplete-string-import-override/c/source/dummy.d b/test/issue1788-incomplete-string-import-override/c/source/dummy.d similarity index 100% rename from test/new_tests/issue1788-incomplete-string-import-override/c/source/dummy.d rename to test/issue1788-incomplete-string-import-override/c/source/dummy.d diff --git a/test/new_tests/issue1788-incomplete-string-import-override/c/views/fancylayout.diet b/test/issue1788-incomplete-string-import-override/c/views/fancylayout.diet similarity index 100% rename from test/new_tests/issue1788-incomplete-string-import-override/c/views/fancylayout.diet rename to test/issue1788-incomplete-string-import-override/c/views/fancylayout.diet diff --git a/test/new_tests/issue1788-incomplete-string-import-override/dub.sdl b/test/issue1788-incomplete-string-import-override/dub.sdl similarity index 100% rename from test/new_tests/issue1788-incomplete-string-import-override/dub.sdl rename to test/issue1788-incomplete-string-import-override/dub.sdl diff --git a/test/new_tests/issue1788-incomplete-string-import-override/source/app.d b/test/issue1788-incomplete-string-import-override/source/app.d similarity index 100% rename from test/new_tests/issue1788-incomplete-string-import-override/source/app.d rename to test/issue1788-incomplete-string-import-override/source/app.d diff --git a/test/new_tests/issue1788-incomplete-string-import-override/views/layout.diet b/test/issue1788-incomplete-string-import-override/views/layout.diet similarity index 100% rename from test/new_tests/issue1788-incomplete-string-import-override/views/layout.diet rename to test/issue1788-incomplete-string-import-override/views/layout.diet diff --git a/test/new_tests/issue1856-build-unittest/.gitignore b/test/issue1856-build-unittest/.gitignore similarity index 100% rename from test/new_tests/issue1856-build-unittest/.gitignore rename to test/issue1856-build-unittest/.gitignore diff --git a/test/new_tests/issue1856-build-unittest/dub.json b/test/issue1856-build-unittest/dub.json similarity index 100% rename from test/new_tests/issue1856-build-unittest/dub.json rename to test/issue1856-build-unittest/dub.json diff --git a/test/new_tests/issue1856-build-unittest/sample/full_ut.d b/test/issue1856-build-unittest/sample/full_ut.d similarity index 100% rename from test/new_tests/issue1856-build-unittest/sample/full_ut.d rename to test/issue1856-build-unittest/sample/full_ut.d diff --git a/test/new_tests/issue1856-build-unittest/sample/no_ut.d b/test/issue1856-build-unittest/sample/no_ut.d similarity index 100% rename from test/new_tests/issue1856-build-unittest/sample/no_ut.d rename to test/issue1856-build-unittest/sample/no_ut.d diff --git a/test/new_tests/issue1856-build-unittest/sample/partial_ut.d b/test/issue1856-build-unittest/sample/partial_ut.d similarity index 100% rename from test/new_tests/issue1856-build-unittest/sample/partial_ut.d rename to test/issue1856-build-unittest/sample/partial_ut.d diff --git a/test/new_tests/issue1856-build-unittest/sample/partial_ut2.d b/test/issue1856-build-unittest/sample/partial_ut2.d similarity index 100% rename from test/new_tests/issue1856-build-unittest/sample/partial_ut2.d rename to test/issue1856-build-unittest/sample/partial_ut2.d diff --git a/test/new_tests/issue1856-build-unittest/source/app.d b/test/issue1856-build-unittest/source/app.d similarity index 100% rename from test/new_tests/issue1856-build-unittest/source/app.d rename to test/issue1856-build-unittest/source/app.d diff --git a/test/new_tests/issue1867-lowmem/.gitignore b/test/issue1867-lowmem/.gitignore similarity index 100% rename from test/new_tests/issue1867-lowmem/.gitignore rename to test/issue1867-lowmem/.gitignore diff --git a/test/new_tests/issue1867-lowmem/dub.json b/test/issue1867-lowmem/dub.json similarity index 100% rename from test/new_tests/issue1867-lowmem/dub.json rename to test/issue1867-lowmem/dub.json diff --git a/test/new_tests/issue1867-lowmem/sample/dub.sdl b/test/issue1867-lowmem/sample/dub.sdl similarity index 100% rename from test/new_tests/issue1867-lowmem/sample/dub.sdl rename to test/issue1867-lowmem/sample/dub.sdl diff --git a/test/new_tests/issue1867-lowmem/sample/dub.settings.json b/test/issue1867-lowmem/sample/dub.settings.json similarity index 100% rename from test/new_tests/issue1867-lowmem/sample/dub.settings.json rename to test/issue1867-lowmem/sample/dub.settings.json diff --git a/test/new_tests/issue1867-lowmem/sample/source/app.d b/test/issue1867-lowmem/sample/source/app.d similarity index 100% rename from test/new_tests/issue1867-lowmem/sample/source/app.d rename to test/issue1867-lowmem/sample/source/app.d diff --git a/test/new_tests/issue1867-lowmem/source/app.d b/test/issue1867-lowmem/source/app.d similarity index 100% rename from test/new_tests/issue1867-lowmem/source/app.d rename to test/issue1867-lowmem/source/app.d diff --git a/test/new_tests/issue2012-dc-env/.gitignore b/test/issue2012-dc-env/.gitignore similarity index 100% rename from test/new_tests/issue2012-dc-env/.gitignore rename to test/issue2012-dc-env/.gitignore diff --git a/test/new_tests/issue2012-dc-env/dub.json b/test/issue2012-dc-env/dub.json similarity index 100% rename from test/new_tests/issue2012-dc-env/dub.json rename to test/issue2012-dc-env/dub.json diff --git a/test/new_tests/issue2012-dc-env/sample/app.d b/test/issue2012-dc-env/sample/app.d similarity index 100% rename from test/new_tests/issue2012-dc-env/sample/app.d rename to test/issue2012-dc-env/sample/app.d diff --git a/test/new_tests/issue2012-dc-env/source/app.d b/test/issue2012-dc-env/source/app.d similarity index 100% rename from test/new_tests/issue2012-dc-env/source/app.d rename to test/issue2012-dc-env/source/app.d diff --git a/test/new_tests/issue2046-ignored-optional-with-path/.gitignore b/test/issue2046-ignored-optional-with-path/.gitignore similarity index 100% rename from test/new_tests/issue2046-ignored-optional-with-path/.gitignore rename to test/issue2046-ignored-optional-with-path/.gitignore diff --git a/test/new_tests/issue2046-ignored-optional-with-path/dub.json b/test/issue2046-ignored-optional-with-path/dub.json similarity index 100% rename from test/new_tests/issue2046-ignored-optional-with-path/dub.json rename to test/issue2046-ignored-optional-with-path/dub.json diff --git a/test/new_tests/issue2046-ignored-optional-with-path/sample/dub.json b/test/issue2046-ignored-optional-with-path/sample/dub.json similarity index 100% rename from test/new_tests/issue2046-ignored-optional-with-path/sample/dub.json rename to test/issue2046-ignored-optional-with-path/sample/dub.json diff --git a/test/new_tests/issue2046-ignored-optional-with-path/sample/dub.selections.json-nofoo b/test/issue2046-ignored-optional-with-path/sample/dub.selections.json-nofoo similarity index 100% rename from test/new_tests/issue2046-ignored-optional-with-path/sample/dub.selections.json-nofoo rename to test/issue2046-ignored-optional-with-path/sample/dub.selections.json-nofoo diff --git a/test/new_tests/issue2046-ignored-optional-with-path/sample/dub.selections.json-usefoo b/test/issue2046-ignored-optional-with-path/sample/dub.selections.json-usefoo similarity index 100% rename from test/new_tests/issue2046-ignored-optional-with-path/sample/dub.selections.json-usefoo rename to test/issue2046-ignored-optional-with-path/sample/dub.selections.json-usefoo diff --git a/test/new_tests/issue2046-ignored-optional-with-path/sample/libbar/dub.json b/test/issue2046-ignored-optional-with-path/sample/libbar/dub.json similarity index 100% rename from test/new_tests/issue2046-ignored-optional-with-path/sample/libbar/dub.json rename to test/issue2046-ignored-optional-with-path/sample/libbar/dub.json diff --git a/test/new_tests/issue2046-ignored-optional-with-path/sample/libbar/source/libbar/bar.d b/test/issue2046-ignored-optional-with-path/sample/libbar/source/libbar/bar.d similarity index 100% rename from test/new_tests/issue2046-ignored-optional-with-path/sample/libbar/source/libbar/bar.d rename to test/issue2046-ignored-optional-with-path/sample/libbar/source/libbar/bar.d diff --git a/test/new_tests/issue2046-ignored-optional-with-path/sample/libfoo/dub.json b/test/issue2046-ignored-optional-with-path/sample/libfoo/dub.json similarity index 100% rename from test/new_tests/issue2046-ignored-optional-with-path/sample/libfoo/dub.json rename to test/issue2046-ignored-optional-with-path/sample/libfoo/dub.json diff --git a/test/new_tests/issue2046-ignored-optional-with-path/sample/libfoo/source/libfoo/foo.d b/test/issue2046-ignored-optional-with-path/sample/libfoo/source/libfoo/foo.d similarity index 100% rename from test/new_tests/issue2046-ignored-optional-with-path/sample/libfoo/source/libfoo/foo.d rename to test/issue2046-ignored-optional-with-path/sample/libfoo/source/libfoo/foo.d diff --git a/test/new_tests/issue2046-ignored-optional-with-path/sample/source/app.d b/test/issue2046-ignored-optional-with-path/sample/source/app.d similarity index 100% rename from test/new_tests/issue2046-ignored-optional-with-path/sample/source/app.d rename to test/issue2046-ignored-optional-with-path/sample/source/app.d diff --git a/test/new_tests/issue2046-ignored-optional-with-path/source/app.d b/test/issue2046-ignored-optional-with-path/source/app.d similarity index 100% rename from test/new_tests/issue2046-ignored-optional-with-path/source/app.d rename to test/issue2046-ignored-optional-with-path/source/app.d diff --git a/test/new_tests/issue2051_running_unittests_from_dub_single_file_packages_fails/.gitignore b/test/issue2051_running_unittests_from_dub_single_file_packages_fails/.gitignore similarity index 100% rename from test/new_tests/issue2051_running_unittests_from_dub_single_file_packages_fails/.gitignore rename to test/issue2051_running_unittests_from_dub_single_file_packages_fails/.gitignore diff --git a/test/new_tests/issue2051_running_unittests_from_dub_single_file_packages_fails/dub.json b/test/issue2051_running_unittests_from_dub_single_file_packages_fails/dub.json similarity index 100% rename from test/new_tests/issue2051_running_unittests_from_dub_single_file_packages_fails/dub.json rename to test/issue2051_running_unittests_from_dub_single_file_packages_fails/dub.json diff --git a/test/new_tests/issue2051_running_unittests_from_dub_single_file_packages_fails/single_failure.d b/test/issue2051_running_unittests_from_dub_single_file_packages_fails/single_failure.d similarity index 100% rename from test/new_tests/issue2051_running_unittests_from_dub_single_file_packages_fails/single_failure.d rename to test/issue2051_running_unittests_from_dub_single_file_packages_fails/single_failure.d diff --git a/test/new_tests/issue2051_running_unittests_from_dub_single_file_packages_fails/single_success.d b/test/issue2051_running_unittests_from_dub_single_file_packages_fails/single_success.d similarity index 100% rename from test/new_tests/issue2051_running_unittests_from_dub_single_file_packages_fails/single_success.d rename to test/issue2051_running_unittests_from_dub_single_file_packages_fails/single_success.d diff --git a/test/new_tests/issue2051_running_unittests_from_dub_single_file_packages_fails/source/app.d b/test/issue2051_running_unittests_from_dub_single_file_packages_fails/source/app.d similarity index 100% rename from test/new_tests/issue2051_running_unittests_from_dub_single_file_packages_fails/source/app.d rename to test/issue2051_running_unittests_from_dub_single_file_packages_fails/source/app.d diff --git a/test/new_tests/issue2085-target-none-visuald/.gitignore b/test/issue2085-target-none-visuald/.gitignore similarity index 100% rename from test/new_tests/issue2085-target-none-visuald/.gitignore rename to test/issue2085-target-none-visuald/.gitignore diff --git a/test/new_tests/issue2085-target-none-visuald/dub.json b/test/issue2085-target-none-visuald/dub.json similarity index 100% rename from test/new_tests/issue2085-target-none-visuald/dub.json rename to test/issue2085-target-none-visuald/dub.json diff --git a/test/new_tests/issue2085-target-none-visuald/sample/dub.json b/test/issue2085-target-none-visuald/sample/dub.json similarity index 100% rename from test/new_tests/issue2085-target-none-visuald/sample/dub.json rename to test/issue2085-target-none-visuald/sample/dub.json diff --git a/test/new_tests/issue2085-target-none-visuald/sample/sub/dub.json b/test/issue2085-target-none-visuald/sample/sub/dub.json similarity index 100% rename from test/new_tests/issue2085-target-none-visuald/sample/sub/dub.json rename to test/issue2085-target-none-visuald/sample/sub/dub.json diff --git a/test/new_tests/issue2085-target-none-visuald/sample/sub/source/app.d b/test/issue2085-target-none-visuald/sample/sub/source/app.d similarity index 100% rename from test/new_tests/issue2085-target-none-visuald/sample/sub/source/app.d rename to test/issue2085-target-none-visuald/sample/sub/source/app.d diff --git a/test/new_tests/issue2085-target-none-visuald/source/app.d b/test/issue2085-target-none-visuald/source/app.d similarity index 100% rename from test/new_tests/issue2085-target-none-visuald/source/app.d rename to test/issue2085-target-none-visuald/source/app.d diff --git a/test/new_tests/issue2086-copyfiles-subpackage-targetpath/.gitignore b/test/issue2086-copyfiles-subpackage-targetpath/.gitignore similarity index 100% rename from test/new_tests/issue2086-copyfiles-subpackage-targetpath/.gitignore rename to test/issue2086-copyfiles-subpackage-targetpath/.gitignore diff --git a/test/new_tests/issue2086-copyfiles-subpackage-targetpath/dub.json b/test/issue2086-copyfiles-subpackage-targetpath/dub.json similarity index 100% rename from test/new_tests/issue2086-copyfiles-subpackage-targetpath/dub.json rename to test/issue2086-copyfiles-subpackage-targetpath/dub.json diff --git a/test/new_tests/issue2086-copyfiles-subpackage-targetpath/sample/dub.json b/test/issue2086-copyfiles-subpackage-targetpath/sample/dub.json similarity index 100% rename from test/new_tests/issue2086-copyfiles-subpackage-targetpath/sample/dub.json rename to test/issue2086-copyfiles-subpackage-targetpath/sample/dub.json diff --git a/test/new_tests/issue2086-copyfiles-subpackage-targetpath/sample/sub/dub.json b/test/issue2086-copyfiles-subpackage-targetpath/sample/sub/dub.json similarity index 100% rename from test/new_tests/issue2086-copyfiles-subpackage-targetpath/sample/sub/dub.json rename to test/issue2086-copyfiles-subpackage-targetpath/sample/sub/dub.json diff --git a/test/new_tests/issue2086-copyfiles-subpackage-targetpath/sample/sub/files/to_be_deployed.txt b/test/issue2086-copyfiles-subpackage-targetpath/sample/sub/files/to_be_deployed.txt similarity index 100% rename from test/new_tests/issue2086-copyfiles-subpackage-targetpath/sample/sub/files/to_be_deployed.txt rename to test/issue2086-copyfiles-subpackage-targetpath/sample/sub/files/to_be_deployed.txt diff --git a/test/new_tests/issue2086-copyfiles-subpackage-targetpath/sample/sub/source/app.d b/test/issue2086-copyfiles-subpackage-targetpath/sample/sub/source/app.d similarity index 100% rename from test/new_tests/issue2086-copyfiles-subpackage-targetpath/sample/sub/source/app.d rename to test/issue2086-copyfiles-subpackage-targetpath/sample/sub/source/app.d diff --git a/test/new_tests/issue2086-copyfiles-subpackage-targetpath/source/app.d b/test/issue2086-copyfiles-subpackage-targetpath/source/app.d similarity index 100% rename from test/new_tests/issue2086-copyfiles-subpackage-targetpath/source/app.d rename to test/issue2086-copyfiles-subpackage-targetpath/source/app.d diff --git a/test/new_tests/issue2190-unset-TEMP/.gitignore b/test/issue2190-unset-TEMP/.gitignore similarity index 100% rename from test/new_tests/issue2190-unset-TEMP/.gitignore rename to test/issue2190-unset-TEMP/.gitignore diff --git a/test/new_tests/issue2190-unset-TEMP/dub.json b/test/issue2190-unset-TEMP/dub.json similarity index 100% rename from test/new_tests/issue2190-unset-TEMP/dub.json rename to test/issue2190-unset-TEMP/dub.json diff --git a/test/new_tests/issue2190-unset-TEMP/single.d b/test/issue2190-unset-TEMP/single.d similarity index 100% rename from test/new_tests/issue2190-unset-TEMP/single.d rename to test/issue2190-unset-TEMP/single.d diff --git a/test/new_tests/issue2190-unset-TEMP/source/app.d b/test/issue2190-unset-TEMP/source/app.d similarity index 100% rename from test/new_tests/issue2190-unset-TEMP/source/app.d rename to test/issue2190-unset-TEMP/source/app.d diff --git a/test/new_tests/issue2190-unset-TEMP/test.config b/test/issue2190-unset-TEMP/test.config similarity index 100% rename from test/new_tests/issue2190-unset-TEMP/test.config rename to test/issue2190-unset-TEMP/test.config diff --git a/test/new_tests/issue2192-environment-variables/.gitignore b/test/issue2192-environment-variables/.gitignore similarity index 100% rename from test/new_tests/issue2192-environment-variables/.gitignore rename to test/issue2192-environment-variables/.gitignore diff --git a/test/new_tests/issue2192-environment-variables/dub.json b/test/issue2192-environment-variables/dub.json similarity index 100% rename from test/new_tests/issue2192-environment-variables/dub.json rename to test/issue2192-environment-variables/dub.json diff --git a/test/new_tests/issue2192-environment-variables/sample/dub.sdl b/test/issue2192-environment-variables/sample/dub.sdl similarity index 100% rename from test/new_tests/issue2192-environment-variables/sample/dub.sdl rename to test/issue2192-environment-variables/sample/dub.sdl diff --git a/test/new_tests/issue2192-environment-variables/sample/source/lib.d b/test/issue2192-environment-variables/sample/source/lib.d similarity index 100% rename from test/new_tests/issue2192-environment-variables/sample/source/lib.d rename to test/issue2192-environment-variables/sample/source/lib.d diff --git a/test/new_tests/issue2192-environment-variables/source/app.d b/test/issue2192-environment-variables/source/app.d similarity index 100% rename from test/new_tests/issue2192-environment-variables/source/app.d rename to test/issue2192-environment-variables/source/app.d diff --git a/test/new_tests/issue2234-copy-read-only-files/.gitignore b/test/issue2234-copy-read-only-files/.gitignore similarity index 100% rename from test/new_tests/issue2234-copy-read-only-files/.gitignore rename to test/issue2234-copy-read-only-files/.gitignore diff --git a/test/new_tests/issue2234-copy-read-only-files/dub.json b/test/issue2234-copy-read-only-files/dub.json similarity index 100% rename from test/new_tests/issue2234-copy-read-only-files/dub.json rename to test/issue2234-copy-read-only-files/dub.json diff --git a/test/new_tests/issue2234-copy-read-only-files/sample/dub.json b/test/issue2234-copy-read-only-files/sample/dub.json similarity index 100% rename from test/new_tests/issue2234-copy-read-only-files/sample/dub.json rename to test/issue2234-copy-read-only-files/sample/dub.json diff --git a/test/new_tests/issue2234-copy-read-only-files/sample/files/images/to_be_deployed.img b/test/issue2234-copy-read-only-files/sample/files/images/to_be_deployed.img similarity index 100% rename from test/new_tests/issue2234-copy-read-only-files/sample/files/images/to_be_deployed.img rename to test/issue2234-copy-read-only-files/sample/files/images/to_be_deployed.img diff --git a/test/new_tests/issue2234-copy-read-only-files/sample/files/to_be_deployed.bin b/test/issue2234-copy-read-only-files/sample/files/to_be_deployed.bin similarity index 100% rename from test/new_tests/issue2234-copy-read-only-files/sample/files/to_be_deployed.bin rename to test/issue2234-copy-read-only-files/sample/files/to_be_deployed.bin diff --git a/test/new_tests/issue2234-copy-read-only-files/sample/source/app.d b/test/issue2234-copy-read-only-files/sample/source/app.d similarity index 100% rename from test/new_tests/issue2234-copy-read-only-files/sample/source/app.d rename to test/issue2234-copy-read-only-files/sample/source/app.d diff --git a/test/new_tests/issue2234-copy-read-only-files/source/app.d b/test/issue2234-copy-read-only-files/source/app.d similarity index 100% rename from test/new_tests/issue2234-copy-read-only-files/source/app.d rename to test/issue2234-copy-read-only-files/source/app.d diff --git a/test/new_tests/issue2258-dynLib-exe-dep/dub.json b/test/issue2258-dynLib-exe-dep/dub.json similarity index 100% rename from test/new_tests/issue2258-dynLib-exe-dep/dub.json rename to test/issue2258-dynLib-exe-dep/dub.json diff --git a/test/new_tests/issue2258-dynLib-exe-dep/source/app.d b/test/issue2258-dynLib-exe-dep/source/app.d similarity index 100% rename from test/new_tests/issue2258-dynLib-exe-dep/source/app.d rename to test/issue2258-dynLib-exe-dep/source/app.d diff --git a/test/new_tests/issue2258-dynLib-exe-dep/test.config b/test/issue2258-dynLib-exe-dep/test.config similarity index 100% rename from test/new_tests/issue2258-dynLib-exe-dep/test.config rename to test/issue2258-dynLib-exe-dep/test.config diff --git a/test/new_tests/issue2262-exact-cached-version-match/.gitignore b/test/issue2262-exact-cached-version-match/.gitignore similarity index 100% rename from test/new_tests/issue2262-exact-cached-version-match/.gitignore rename to test/issue2262-exact-cached-version-match/.gitignore diff --git a/test/new_tests/issue2262-exact-cached-version-match/dub.json b/test/issue2262-exact-cached-version-match/dub.json similarity index 100% rename from test/new_tests/issue2262-exact-cached-version-match/dub.json rename to test/issue2262-exact-cached-version-match/dub.json diff --git a/test/new_tests/issue2262-exact-cached-version-match/sample/dub.sdl b/test/issue2262-exact-cached-version-match/sample/dub.sdl similarity index 100% rename from test/new_tests/issue2262-exact-cached-version-match/sample/dub.sdl rename to test/issue2262-exact-cached-version-match/sample/dub.sdl diff --git a/test/new_tests/issue2262-exact-cached-version-match/sample/source/app.d b/test/issue2262-exact-cached-version-match/sample/source/app.d similarity index 100% rename from test/new_tests/issue2262-exact-cached-version-match/sample/source/app.d rename to test/issue2262-exact-cached-version-match/sample/source/app.d diff --git a/test/new_tests/issue2262-exact-cached-version-match/source/app.d b/test/issue2262-exact-cached-version-match/source/app.d similarity index 100% rename from test/new_tests/issue2262-exact-cached-version-match/source/app.d rename to test/issue2262-exact-cached-version-match/source/app.d diff --git a/test/new_tests/issue2348-postbuildcommands/.gitignore b/test/issue2348-postbuildcommands/.gitignore similarity index 100% rename from test/new_tests/issue2348-postbuildcommands/.gitignore rename to test/issue2348-postbuildcommands/.gitignore diff --git a/test/new_tests/issue2348-postbuildcommands/dub.json b/test/issue2348-postbuildcommands/dub.json similarity index 100% rename from test/new_tests/issue2348-postbuildcommands/dub.json rename to test/issue2348-postbuildcommands/dub.json diff --git a/test/new_tests/issue2348-postbuildcommands/single.d b/test/issue2348-postbuildcommands/single.d similarity index 100% rename from test/new_tests/issue2348-postbuildcommands/single.d rename to test/issue2348-postbuildcommands/single.d diff --git a/test/new_tests/issue2348-postbuildcommands/source/app.d b/test/issue2348-postbuildcommands/source/app.d similarity index 100% rename from test/new_tests/issue2348-postbuildcommands/source/app.d rename to test/issue2348-postbuildcommands/source/app.d diff --git a/test/new_tests/issue2377-dynLib-dep-extra-files/.gitignore b/test/issue2377-dynLib-dep-extra-files/.gitignore similarity index 100% rename from test/new_tests/issue2377-dynLib-dep-extra-files/.gitignore rename to test/issue2377-dynLib-dep-extra-files/.gitignore diff --git a/test/new_tests/issue2377-dynLib-dep-extra-files/dub.json b/test/issue2377-dynLib-dep-extra-files/dub.json similarity index 100% rename from test/new_tests/issue2377-dynLib-dep-extra-files/dub.json rename to test/issue2377-dynLib-dep-extra-files/dub.json diff --git a/test/new_tests/issue2377-dynLib-dep-extra-files/sample/dep1/dub.sdl b/test/issue2377-dynLib-dep-extra-files/sample/dep1/dub.sdl similarity index 100% rename from test/new_tests/issue2377-dynLib-dep-extra-files/sample/dep1/dub.sdl rename to test/issue2377-dynLib-dep-extra-files/sample/dep1/dub.sdl diff --git a/test/new_tests/issue2377-dynLib-dep-extra-files/sample/dep1/source/dep1.d b/test/issue2377-dynLib-dep-extra-files/sample/dep1/source/dep1.d similarity index 100% rename from test/new_tests/issue2377-dynLib-dep-extra-files/sample/dep1/source/dep1.d rename to test/issue2377-dynLib-dep-extra-files/sample/dep1/source/dep1.d diff --git a/test/new_tests/issue2377-dynLib-dep-extra-files/sample/dep2/dub.sdl b/test/issue2377-dynLib-dep-extra-files/sample/dep2/dub.sdl similarity index 100% rename from test/new_tests/issue2377-dynLib-dep-extra-files/sample/dep2/dub.sdl rename to test/issue2377-dynLib-dep-extra-files/sample/dep2/dub.sdl diff --git a/test/new_tests/issue2377-dynLib-dep-extra-files/sample/dep2/source/dep2.d b/test/issue2377-dynLib-dep-extra-files/sample/dep2/source/dep2.d similarity index 100% rename from test/new_tests/issue2377-dynLib-dep-extra-files/sample/dep2/source/dep2.d rename to test/issue2377-dynLib-dep-extra-files/sample/dep2/source/dep2.d diff --git a/test/new_tests/issue2377-dynLib-dep-extra-files/sample/framework/dub.sdl b/test/issue2377-dynLib-dep-extra-files/sample/framework/dub.sdl similarity index 100% rename from test/new_tests/issue2377-dynLib-dep-extra-files/sample/framework/dub.sdl rename to test/issue2377-dynLib-dep-extra-files/sample/framework/dub.sdl diff --git a/test/new_tests/issue2377-dynLib-dep-extra-files/sample/parent/dub.sdl b/test/issue2377-dynLib-dep-extra-files/sample/parent/dub.sdl similarity index 100% rename from test/new_tests/issue2377-dynLib-dep-extra-files/sample/parent/dub.sdl rename to test/issue2377-dynLib-dep-extra-files/sample/parent/dub.sdl diff --git a/test/new_tests/issue2377-dynLib-dep-extra-files/sample/parent/source/app.d b/test/issue2377-dynLib-dep-extra-files/sample/parent/source/app.d similarity index 100% rename from test/new_tests/issue2377-dynLib-dep-extra-files/sample/parent/source/app.d rename to test/issue2377-dynLib-dep-extra-files/sample/parent/source/app.d diff --git a/test/new_tests/issue2377-dynLib-dep-extra-files/sample/parent/source/parent.d b/test/issue2377-dynLib-dep-extra-files/sample/parent/source/parent.d similarity index 100% rename from test/new_tests/issue2377-dynLib-dep-extra-files/sample/parent/source/parent.d rename to test/issue2377-dynLib-dep-extra-files/sample/parent/source/parent.d diff --git a/test/new_tests/issue2377-dynLib-dep-extra-files/source/app.d b/test/issue2377-dynLib-dep-extra-files/source/app.d similarity index 100% rename from test/new_tests/issue2377-dynLib-dep-extra-files/source/app.d rename to test/issue2377-dynLib-dep-extra-files/source/app.d diff --git a/test/new_tests/issue2448/.gitignore b/test/issue2448/.gitignore similarity index 100% rename from test/new_tests/issue2448/.gitignore rename to test/issue2448/.gitignore diff --git a/test/new_tests/issue2448/dub.json b/test/issue2448/dub.json similarity index 100% rename from test/new_tests/issue2448/dub.json rename to test/issue2448/dub.json diff --git a/test/new_tests/issue2448/ext/kekw.d b/test/issue2448/ext/kekw.d similarity index 100% rename from test/new_tests/issue2448/ext/kekw.d rename to test/issue2448/ext/kekw.d diff --git a/test/new_tests/issue2448/source/app.d b/test/issue2448/source/app.d similarity index 100% rename from test/new_tests/issue2448/source/app.d rename to test/issue2448/source/app.d diff --git a/test/new_tests/issue2452/dub.json b/test/issue2452/dub.json similarity index 100% rename from test/new_tests/issue2452/dub.json rename to test/issue2452/dub.json diff --git a/test/new_tests/issue2452/source/app.d b/test/issue2452/source/app.d similarity index 100% rename from test/new_tests/issue2452/source/app.d rename to test/issue2452/source/app.d diff --git a/test/new_tests/issue2574-mistyping-commands/dub.json b/test/issue2574-mistyping-commands/dub.json similarity index 100% rename from test/new_tests/issue2574-mistyping-commands/dub.json rename to test/issue2574-mistyping-commands/dub.json diff --git a/test/new_tests/issue2574-mistyping-commands/source/app.d b/test/issue2574-mistyping-commands/source/app.d similarity index 100% rename from test/new_tests/issue2574-mistyping-commands/source/app.d rename to test/issue2574-mistyping-commands/source/app.d diff --git a/test/new_tests/issue2587-subpackage-dependency-resolution/.gitignore b/test/issue2587-subpackage-dependency-resolution/.gitignore similarity index 100% rename from test/new_tests/issue2587-subpackage-dependency-resolution/.gitignore rename to test/issue2587-subpackage-dependency-resolution/.gitignore diff --git a/test/new_tests/issue2587-subpackage-dependency-resolution/dub.json b/test/issue2587-subpackage-dependency-resolution/dub.json similarity index 100% rename from test/new_tests/issue2587-subpackage-dependency-resolution/dub.json rename to test/issue2587-subpackage-dependency-resolution/dub.json diff --git a/test/new_tests/issue2587-subpackage-dependency-resolution/sample/a/dub.json b/test/issue2587-subpackage-dependency-resolution/sample/a/dub.json similarity index 100% rename from test/new_tests/issue2587-subpackage-dependency-resolution/sample/a/dub.json rename to test/issue2587-subpackage-dependency-resolution/sample/a/dub.json diff --git a/test/new_tests/issue2587-subpackage-dependency-resolution/sample/a/source/app.d b/test/issue2587-subpackage-dependency-resolution/sample/a/source/app.d similarity index 100% rename from test/new_tests/issue2587-subpackage-dependency-resolution/sample/a/source/app.d rename to test/issue2587-subpackage-dependency-resolution/sample/a/source/app.d diff --git a/test/new_tests/issue2587-subpackage-dependency-resolution/sample/b/dub.json b/test/issue2587-subpackage-dependency-resolution/sample/b/dub.json similarity index 100% rename from test/new_tests/issue2587-subpackage-dependency-resolution/sample/b/dub.json rename to test/issue2587-subpackage-dependency-resolution/sample/b/dub.json diff --git a/test/new_tests/issue2587-subpackage-dependency-resolution/sample/b/source/b.d b/test/issue2587-subpackage-dependency-resolution/sample/b/source/b.d similarity index 100% rename from test/new_tests/issue2587-subpackage-dependency-resolution/sample/b/source/b.d rename to test/issue2587-subpackage-dependency-resolution/sample/b/source/b.d diff --git a/test/new_tests/issue2587-subpackage-dependency-resolution/sample/c/dub.json b/test/issue2587-subpackage-dependency-resolution/sample/c/dub.json similarity index 100% rename from test/new_tests/issue2587-subpackage-dependency-resolution/sample/c/dub.json rename to test/issue2587-subpackage-dependency-resolution/sample/c/dub.json diff --git a/test/new_tests/issue2587-subpackage-dependency-resolution/sample/c/source/c.d b/test/issue2587-subpackage-dependency-resolution/sample/c/source/c.d similarity index 100% rename from test/new_tests/issue2587-subpackage-dependency-resolution/sample/c/source/c.d rename to test/issue2587-subpackage-dependency-resolution/sample/c/source/c.d diff --git a/test/new_tests/issue2587-subpackage-dependency-resolution/source/app.d b/test/issue2587-subpackage-dependency-resolution/source/app.d similarity index 100% rename from test/new_tests/issue2587-subpackage-dependency-resolution/source/app.d rename to test/issue2587-subpackage-dependency-resolution/source/app.d diff --git a/test/new_tests/issue2650-deprecated-modules/dub.sdl b/test/issue2650-deprecated-modules/dub.sdl similarity index 100% rename from test/new_tests/issue2650-deprecated-modules/dub.sdl rename to test/issue2650-deprecated-modules/dub.sdl diff --git a/test/new_tests/issue2650-deprecated-modules/source/test.d b/test/issue2650-deprecated-modules/source/test.d similarity index 100% rename from test/new_tests/issue2650-deprecated-modules/source/test.d rename to test/issue2650-deprecated-modules/source/test.d diff --git a/test/new_tests/issue2650-deprecated-modules/test.config b/test/issue2650-deprecated-modules/test.config similarity index 100% rename from test/new_tests/issue2650-deprecated-modules/test.config rename to test/issue2650-deprecated-modules/test.config diff --git a/test/new_tests/issue2684-recipe-file/.gitignore b/test/issue2684-recipe-file/.gitignore similarity index 100% rename from test/new_tests/issue2684-recipe-file/.gitignore rename to test/issue2684-recipe-file/.gitignore diff --git a/test/new_tests/issue2684-recipe-file/dub.json b/test/issue2684-recipe-file/dub.json similarity index 100% rename from test/new_tests/issue2684-recipe-file/dub.json rename to test/issue2684-recipe-file/dub.json diff --git a/test/new_tests/issue2684-recipe-file/sample/anotherSource/app.d b/test/issue2684-recipe-file/sample/anotherSource/app.d similarity index 100% rename from test/new_tests/issue2684-recipe-file/sample/anotherSource/app.d rename to test/issue2684-recipe-file/sample/anotherSource/app.d diff --git a/test/new_tests/issue2684-recipe-file/sample/dub.json b/test/issue2684-recipe-file/sample/dub.json similarity index 100% rename from test/new_tests/issue2684-recipe-file/sample/dub.json rename to test/issue2684-recipe-file/sample/dub.json diff --git a/test/new_tests/issue2684-recipe-file/sample/dubWithAnotherSource.json b/test/issue2684-recipe-file/sample/dubWithAnotherSource.json similarity index 100% rename from test/new_tests/issue2684-recipe-file/sample/dubWithAnotherSource.json rename to test/issue2684-recipe-file/sample/dubWithAnotherSource.json diff --git a/test/new_tests/issue2684-recipe-file/sample/source/app.d b/test/issue2684-recipe-file/sample/source/app.d similarity index 100% rename from test/new_tests/issue2684-recipe-file/sample/source/app.d rename to test/issue2684-recipe-file/sample/source/app.d diff --git a/test/new_tests/issue2684-recipe-file/source/app.d b/test/issue2684-recipe-file/source/app.d similarity index 100% rename from test/new_tests/issue2684-recipe-file/source/app.d rename to test/issue2684-recipe-file/source/app.d diff --git a/test/new_tests/issue2698-cimportpaths-broken-with-dmd-ldc/.gitignore b/test/issue2698-cimportpaths-broken-with-dmd-ldc/.gitignore similarity index 100% rename from test/new_tests/issue2698-cimportpaths-broken-with-dmd-ldc/.gitignore rename to test/issue2698-cimportpaths-broken-with-dmd-ldc/.gitignore diff --git a/test/new_tests/issue2698-cimportpaths-broken-with-dmd-ldc/c_headers/foo.h b/test/issue2698-cimportpaths-broken-with-dmd-ldc/c_headers/foo.h similarity index 100% rename from test/new_tests/issue2698-cimportpaths-broken-with-dmd-ldc/c_headers/foo.h rename to test/issue2698-cimportpaths-broken-with-dmd-ldc/c_headers/foo.h diff --git a/test/new_tests/issue2698-cimportpaths-broken-with-dmd-ldc/dub.sdl b/test/issue2698-cimportpaths-broken-with-dmd-ldc/dub.sdl similarity index 100% rename from test/new_tests/issue2698-cimportpaths-broken-with-dmd-ldc/dub.sdl rename to test/issue2698-cimportpaths-broken-with-dmd-ldc/dub.sdl diff --git a/test/new_tests/issue2698-cimportpaths-broken-with-dmd-ldc/source/app.d b/test/issue2698-cimportpaths-broken-with-dmd-ldc/source/app.d similarity index 100% rename from test/new_tests/issue2698-cimportpaths-broken-with-dmd-ldc/source/app.d rename to test/issue2698-cimportpaths-broken-with-dmd-ldc/source/app.d diff --git a/test/new_tests/issue2698-cimportpaths-broken-with-dmd-ldc/source/foo.c b/test/issue2698-cimportpaths-broken-with-dmd-ldc/source/foo.c similarity index 100% rename from test/new_tests/issue2698-cimportpaths-broken-with-dmd-ldc/source/foo.c rename to test/issue2698-cimportpaths-broken-with-dmd-ldc/source/foo.c diff --git a/test/new_tests/issue2698-cimportpaths-broken-with-dmd-ldc/test.config b/test/issue2698-cimportpaths-broken-with-dmd-ldc/test.config similarity index 100% rename from test/new_tests/issue2698-cimportpaths-broken-with-dmd-ldc/test.config rename to test/issue2698-cimportpaths-broken-with-dmd-ldc/test.config diff --git a/test/new_tests/issue2840-build-collision/.gitignore b/test/issue2840-build-collision/.gitignore similarity index 100% rename from test/new_tests/issue2840-build-collision/.gitignore rename to test/issue2840-build-collision/.gitignore diff --git a/test/new_tests/issue2840-build-collision/dub.json b/test/issue2840-build-collision/dub.json similarity index 100% rename from test/new_tests/issue2840-build-collision/dub.json rename to test/issue2840-build-collision/dub.json diff --git a/test/new_tests/issue2840-build-collision/sample/build.d b/test/issue2840-build-collision/sample/build.d similarity index 100% rename from test/new_tests/issue2840-build-collision/sample/build.d rename to test/issue2840-build-collision/sample/build.d diff --git a/test/new_tests/issue2840-build-collision/source/app.d b/test/issue2840-build-collision/source/app.d similarity index 100% rename from test/new_tests/issue2840-build-collision/source/app.d rename to test/issue2840-build-collision/source/app.d diff --git a/test/new_tests/issue346-redundant-flags/.gitignore b/test/issue346-redundant-flags/.gitignore similarity index 100% rename from test/new_tests/issue346-redundant-flags/.gitignore rename to test/issue346-redundant-flags/.gitignore diff --git a/test/new_tests/issue346-redundant-flags/dub.json b/test/issue346-redundant-flags/dub.json similarity index 100% rename from test/new_tests/issue346-redundant-flags/dub.json rename to test/issue346-redundant-flags/dub.json diff --git a/test/new_tests/issue346-redundant-flags/sample/a/dub.json b/test/issue346-redundant-flags/sample/a/dub.json similarity index 100% rename from test/new_tests/issue346-redundant-flags/sample/a/dub.json rename to test/issue346-redundant-flags/sample/a/dub.json diff --git a/test/new_tests/issue346-redundant-flags/sample/a/source/a.d b/test/issue346-redundant-flags/sample/a/source/a.d similarity index 100% rename from test/new_tests/issue346-redundant-flags/sample/a/source/a.d rename to test/issue346-redundant-flags/sample/a/source/a.d diff --git a/test/new_tests/issue346-redundant-flags/sample/b/dub.json b/test/issue346-redundant-flags/sample/b/dub.json similarity index 100% rename from test/new_tests/issue346-redundant-flags/sample/b/dub.json rename to test/issue346-redundant-flags/sample/b/dub.json diff --git a/test/new_tests/issue346-redundant-flags/sample/b/source/b.d b/test/issue346-redundant-flags/sample/b/source/b.d similarity index 100% rename from test/new_tests/issue346-redundant-flags/sample/b/source/b.d rename to test/issue346-redundant-flags/sample/b/source/b.d diff --git a/test/new_tests/issue346-redundant-flags/sample/main/dub.json b/test/issue346-redundant-flags/sample/main/dub.json similarity index 100% rename from test/new_tests/issue346-redundant-flags/sample/main/dub.json rename to test/issue346-redundant-flags/sample/main/dub.json diff --git a/test/new_tests/issue346-redundant-flags/sample/main/source/main.d b/test/issue346-redundant-flags/sample/main/source/main.d similarity index 100% rename from test/new_tests/issue346-redundant-flags/sample/main/source/main.d rename to test/issue346-redundant-flags/sample/main/source/main.d diff --git a/test/new_tests/issue346-redundant-flags/source/app.d b/test/issue346-redundant-flags/source/app.d similarity index 100% rename from test/new_tests/issue346-redundant-flags/source/app.d rename to test/issue346-redundant-flags/source/app.d diff --git a/test/new_tests/issue361-optional-deps/.gitignore b/test/issue361-optional-deps/.gitignore similarity index 100% rename from test/new_tests/issue361-optional-deps/.gitignore rename to test/issue361-optional-deps/.gitignore diff --git a/test/new_tests/issue361-optional-deps/dub.json b/test/issue361-optional-deps/dub.json similarity index 100% rename from test/new_tests/issue361-optional-deps/dub.json rename to test/issue361-optional-deps/dub.json diff --git a/test/new_tests/issue361-optional-deps/sample/a/dub.sdl b/test/issue361-optional-deps/sample/a/dub.sdl similarity index 100% rename from test/new_tests/issue361-optional-deps/sample/a/dub.sdl rename to test/issue361-optional-deps/sample/a/dub.sdl diff --git a/test/new_tests/issue361-optional-deps/sample/a/src/a.d b/test/issue361-optional-deps/sample/a/src/a.d similarity index 100% rename from test/new_tests/issue361-optional-deps/sample/a/src/a.d rename to test/issue361-optional-deps/sample/a/src/a.d diff --git a/test/new_tests/issue361-optional-deps/sample/b/dub.sdl b/test/issue361-optional-deps/sample/b/dub.sdl similarity index 100% rename from test/new_tests/issue361-optional-deps/sample/b/dub.sdl rename to test/issue361-optional-deps/sample/b/dub.sdl diff --git a/test/new_tests/issue361-optional-deps/sample/b/src/b.d b/test/issue361-optional-deps/sample/b/src/b.d similarity index 100% rename from test/new_tests/issue361-optional-deps/sample/b/src/b.d rename to test/issue361-optional-deps/sample/b/src/b.d diff --git a/test/new_tests/issue361-optional-deps/sample/main1/dub.sdl b/test/issue361-optional-deps/sample/main1/dub.sdl similarity index 100% rename from test/new_tests/issue361-optional-deps/sample/main1/dub.sdl rename to test/issue361-optional-deps/sample/main1/dub.sdl diff --git a/test/new_tests/issue361-optional-deps/sample/main1/src/main1.d b/test/issue361-optional-deps/sample/main1/src/main1.d similarity index 100% rename from test/new_tests/issue361-optional-deps/sample/main1/src/main1.d rename to test/issue361-optional-deps/sample/main1/src/main1.d diff --git a/test/new_tests/issue361-optional-deps/sample/main2/dub.sdl b/test/issue361-optional-deps/sample/main2/dub.sdl similarity index 100% rename from test/new_tests/issue361-optional-deps/sample/main2/dub.sdl rename to test/issue361-optional-deps/sample/main2/dub.sdl diff --git a/test/new_tests/issue361-optional-deps/sample/main2/dub.selections.json b/test/issue361-optional-deps/sample/main2/dub.selections.json similarity index 100% rename from test/new_tests/issue361-optional-deps/sample/main2/dub.selections.json rename to test/issue361-optional-deps/sample/main2/dub.selections.json diff --git a/test/new_tests/issue361-optional-deps/sample/main2/src/main2.d b/test/issue361-optional-deps/sample/main2/src/main2.d similarity index 100% rename from test/new_tests/issue361-optional-deps/sample/main2/src/main2.d rename to test/issue361-optional-deps/sample/main2/src/main2.d diff --git a/test/new_tests/issue361-optional-deps/source/app.d b/test/issue361-optional-deps/source/app.d similarity index 100% rename from test/new_tests/issue361-optional-deps/source/app.d rename to test/issue361-optional-deps/source/app.d diff --git a/test/new_tests/issue502-root-import/dub.json b/test/issue502-root-import/dub.json similarity index 100% rename from test/new_tests/issue502-root-import/dub.json rename to test/issue502-root-import/dub.json diff --git a/test/new_tests/issue502-root-import/source/app.d b/test/issue502-root-import/source/app.d similarity index 100% rename from test/new_tests/issue502-root-import/source/app.d rename to test/issue502-root-import/source/app.d diff --git a/test/new_tests/issue564-invalid-upgrade-dependency/.gitignore b/test/issue564-invalid-upgrade-dependency/.gitignore similarity index 100% rename from test/new_tests/issue564-invalid-upgrade-dependency/.gitignore rename to test/issue564-invalid-upgrade-dependency/.gitignore diff --git a/test/new_tests/issue564-invalid-upgrade-dependency/dub.json b/test/issue564-invalid-upgrade-dependency/dub.json similarity index 100% rename from test/new_tests/issue564-invalid-upgrade-dependency/dub.json rename to test/issue564-invalid-upgrade-dependency/dub.json diff --git a/test/new_tests/issue564-invalid-upgrade-dependency/sample/a-1.0.0/dub.json b/test/issue564-invalid-upgrade-dependency/sample/a-1.0.0/dub.json similarity index 100% rename from test/new_tests/issue564-invalid-upgrade-dependency/sample/a-1.0.0/dub.json rename to test/issue564-invalid-upgrade-dependency/sample/a-1.0.0/dub.json diff --git a/test/new_tests/issue564-invalid-upgrade-dependency/sample/a-1.0.0/source/a.d b/test/issue564-invalid-upgrade-dependency/sample/a-1.0.0/source/a.d similarity index 100% rename from test/new_tests/issue564-invalid-upgrade-dependency/sample/a-1.0.0/source/a.d rename to test/issue564-invalid-upgrade-dependency/sample/a-1.0.0/source/a.d diff --git a/test/new_tests/issue564-invalid-upgrade-dependency/sample/a-1.1.0/dub.json b/test/issue564-invalid-upgrade-dependency/sample/a-1.1.0/dub.json similarity index 100% rename from test/new_tests/issue564-invalid-upgrade-dependency/sample/a-1.1.0/dub.json rename to test/issue564-invalid-upgrade-dependency/sample/a-1.1.0/dub.json diff --git a/test/new_tests/issue564-invalid-upgrade-dependency/sample/a-1.1.0/source/a.d b/test/issue564-invalid-upgrade-dependency/sample/a-1.1.0/source/a.d similarity index 100% rename from test/new_tests/issue564-invalid-upgrade-dependency/sample/a-1.1.0/source/a.d rename to test/issue564-invalid-upgrade-dependency/sample/a-1.1.0/source/a.d diff --git a/test/new_tests/issue564-invalid-upgrade-dependency/sample/main/dub.json b/test/issue564-invalid-upgrade-dependency/sample/main/dub.json similarity index 100% rename from test/new_tests/issue564-invalid-upgrade-dependency/sample/main/dub.json rename to test/issue564-invalid-upgrade-dependency/sample/main/dub.json diff --git a/test/new_tests/issue564-invalid-upgrade-dependency/sample/main/dub.selections.json b/test/issue564-invalid-upgrade-dependency/sample/main/dub.selections.json similarity index 100% rename from test/new_tests/issue564-invalid-upgrade-dependency/sample/main/dub.selections.json rename to test/issue564-invalid-upgrade-dependency/sample/main/dub.selections.json diff --git a/test/new_tests/issue564-invalid-upgrade-dependency/sample/main/source/app.d b/test/issue564-invalid-upgrade-dependency/sample/main/source/app.d similarity index 100% rename from test/new_tests/issue564-invalid-upgrade-dependency/sample/main/source/app.d rename to test/issue564-invalid-upgrade-dependency/sample/main/source/app.d diff --git a/test/new_tests/issue564-invalid-upgrade-dependency/source/app.d b/test/issue564-invalid-upgrade-dependency/source/app.d similarity index 100% rename from test/new_tests/issue564-invalid-upgrade-dependency/source/app.d rename to test/issue564-invalid-upgrade-dependency/source/app.d diff --git a/test/new_tests/issue586-subpack-dep/.gitignore b/test/issue586-subpack-dep/.gitignore similarity index 100% rename from test/new_tests/issue586-subpack-dep/.gitignore rename to test/issue586-subpack-dep/.gitignore diff --git a/test/new_tests/issue586-subpack-dep/dub.json b/test/issue586-subpack-dep/dub.json similarity index 100% rename from test/new_tests/issue586-subpack-dep/dub.json rename to test/issue586-subpack-dep/dub.json diff --git a/test/new_tests/issue586-subpack-dep/sample/a/b/dub.sdl b/test/issue586-subpack-dep/sample/a/b/dub.sdl similarity index 100% rename from test/new_tests/issue586-subpack-dep/sample/a/b/dub.sdl rename to test/issue586-subpack-dep/sample/a/b/dub.sdl diff --git a/test/new_tests/issue586-subpack-dep/sample/a/b/source/b.d b/test/issue586-subpack-dep/sample/a/b/source/b.d similarity index 100% rename from test/new_tests/issue586-subpack-dep/sample/a/b/source/b.d rename to test/issue586-subpack-dep/sample/a/b/source/b.d diff --git a/test/new_tests/issue586-subpack-dep/sample/a/dub.sdl b/test/issue586-subpack-dep/sample/a/dub.sdl similarity index 100% rename from test/new_tests/issue586-subpack-dep/sample/a/dub.sdl rename to test/issue586-subpack-dep/sample/a/dub.sdl diff --git a/test/new_tests/issue586-subpack-dep/sample/a/source/a.d b/test/issue586-subpack-dep/sample/a/source/a.d similarity index 100% rename from test/new_tests/issue586-subpack-dep/sample/a/source/a.d rename to test/issue586-subpack-dep/sample/a/source/a.d diff --git a/test/new_tests/issue586-subpack-dep/sample/main/dub.sdl b/test/issue586-subpack-dep/sample/main/dub.sdl similarity index 100% rename from test/new_tests/issue586-subpack-dep/sample/main/dub.sdl rename to test/issue586-subpack-dep/sample/main/dub.sdl diff --git a/test/new_tests/issue586-subpack-dep/sample/main/dub.selections.json b/test/issue586-subpack-dep/sample/main/dub.selections.json similarity index 100% rename from test/new_tests/issue586-subpack-dep/sample/main/dub.selections.json rename to test/issue586-subpack-dep/sample/main/dub.selections.json diff --git a/test/new_tests/issue586-subpack-dep/sample/main/source/c.d b/test/issue586-subpack-dep/sample/main/source/c.d similarity index 100% rename from test/new_tests/issue586-subpack-dep/sample/main/source/c.d rename to test/issue586-subpack-dep/sample/main/source/c.d diff --git a/test/new_tests/issue586-subpack-dep/source/app.d b/test/issue586-subpack-dep/source/app.d similarity index 100% rename from test/new_tests/issue586-subpack-dep/source/app.d rename to test/issue586-subpack-dep/source/app.d diff --git a/test/new_tests/issue613-dynlib-pic/dub.sdl b/test/issue613-dynlib-pic/dub.sdl similarity index 100% rename from test/new_tests/issue613-dynlib-pic/dub.sdl rename to test/issue613-dynlib-pic/dub.sdl diff --git a/test/new_tests/issue613-dynlib-pic/source/app.d b/test/issue613-dynlib-pic/source/app.d similarity index 100% rename from test/new_tests/issue613-dynlib-pic/source/app.d rename to test/issue613-dynlib-pic/source/app.d diff --git a/test/new_tests/issue613-dynlib-pic/test.config b/test/issue613-dynlib-pic/test.config similarity index 100% rename from test/new_tests/issue613-dynlib-pic/test.config rename to test/issue613-dynlib-pic/test.config diff --git a/test/new_tests/issue616-describe-vs-generate-commands/.gitignore b/test/issue616-describe-vs-generate-commands/.gitignore similarity index 100% rename from test/new_tests/issue616-describe-vs-generate-commands/.gitignore rename to test/issue616-describe-vs-generate-commands/.gitignore diff --git a/test/new_tests/issue616-describe-vs-generate-commands/dub.json b/test/issue616-describe-vs-generate-commands/dub.json similarity index 100% rename from test/new_tests/issue616-describe-vs-generate-commands/dub.json rename to test/issue616-describe-vs-generate-commands/dub.json diff --git a/test/new_tests/issue616-describe-vs-generate-commands/sample/issue616-describe-vs-generate-commands/do-preGenerateCommands.sh b/test/issue616-describe-vs-generate-commands/sample/issue616-describe-vs-generate-commands/do-preGenerateCommands.sh similarity index 100% rename from test/new_tests/issue616-describe-vs-generate-commands/sample/issue616-describe-vs-generate-commands/do-preGenerateCommands.sh rename to test/issue616-describe-vs-generate-commands/sample/issue616-describe-vs-generate-commands/do-preGenerateCommands.sh diff --git a/test/new_tests/issue616-describe-vs-generate-commands/sample/issue616-describe-vs-generate-commands/dub.json b/test/issue616-describe-vs-generate-commands/sample/issue616-describe-vs-generate-commands/dub.json similarity index 100% rename from test/new_tests/issue616-describe-vs-generate-commands/sample/issue616-describe-vs-generate-commands/dub.json rename to test/issue616-describe-vs-generate-commands/sample/issue616-describe-vs-generate-commands/dub.json diff --git a/test/new_tests/issue616-describe-vs-generate-commands/sample/issue616-describe-vs-generate-commands/src/dummy.d b/test/issue616-describe-vs-generate-commands/sample/issue616-describe-vs-generate-commands/src/dummy.d similarity index 100% rename from test/new_tests/issue616-describe-vs-generate-commands/sample/issue616-describe-vs-generate-commands/src/dummy.d rename to test/issue616-describe-vs-generate-commands/sample/issue616-describe-vs-generate-commands/src/dummy.d diff --git a/test/new_tests/issue616-describe-vs-generate-commands/sample/issue616-subpack/dub.json b/test/issue616-describe-vs-generate-commands/sample/issue616-subpack/dub.json similarity index 100% rename from test/new_tests/issue616-describe-vs-generate-commands/sample/issue616-subpack/dub.json rename to test/issue616-describe-vs-generate-commands/sample/issue616-subpack/dub.json diff --git a/test/new_tests/issue616-describe-vs-generate-commands/sample/issue616-subpack/src/dummy.d b/test/issue616-describe-vs-generate-commands/sample/issue616-subpack/src/dummy.d similarity index 100% rename from test/new_tests/issue616-describe-vs-generate-commands/sample/issue616-subpack/src/dummy.d rename to test/issue616-describe-vs-generate-commands/sample/issue616-subpack/src/dummy.d diff --git a/test/new_tests/issue616-describe-vs-generate-commands/sample/issue616-subsubpack/dub.json b/test/issue616-describe-vs-generate-commands/sample/issue616-subsubpack/dub.json similarity index 100% rename from test/new_tests/issue616-describe-vs-generate-commands/sample/issue616-subsubpack/dub.json rename to test/issue616-describe-vs-generate-commands/sample/issue616-subsubpack/dub.json diff --git a/test/new_tests/issue616-describe-vs-generate-commands/sample/issue616-subsubpack/src/dummy.d b/test/issue616-describe-vs-generate-commands/sample/issue616-subsubpack/src/dummy.d similarity index 100% rename from test/new_tests/issue616-describe-vs-generate-commands/sample/issue616-subsubpack/src/dummy.d rename to test/issue616-describe-vs-generate-commands/sample/issue616-subsubpack/src/dummy.d diff --git a/test/new_tests/issue616-describe-vs-generate-commands/source/app.d b/test/issue616-describe-vs-generate-commands/source/app.d similarity index 100% rename from test/new_tests/issue616-describe-vs-generate-commands/source/app.d rename to test/issue616-describe-vs-generate-commands/source/app.d diff --git a/test/new_tests/issue672-upgrade-optional/.gitignore b/test/issue672-upgrade-optional/.gitignore similarity index 100% rename from test/new_tests/issue672-upgrade-optional/.gitignore rename to test/issue672-upgrade-optional/.gitignore diff --git a/test/new_tests/issue672-upgrade-optional/dub.json b/test/issue672-upgrade-optional/dub.json similarity index 100% rename from test/new_tests/issue672-upgrade-optional/dub.json rename to test/issue672-upgrade-optional/dub.json diff --git a/test/new_tests/issue672-upgrade-optional/sample/dub.sdl b/test/issue672-upgrade-optional/sample/dub.sdl similarity index 100% rename from test/new_tests/issue672-upgrade-optional/sample/dub.sdl rename to test/issue672-upgrade-optional/sample/dub.sdl diff --git a/test/new_tests/issue672-upgrade-optional/source/app.d b/test/issue672-upgrade-optional/source/app.d similarity index 100% rename from test/new_tests/issue672-upgrade-optional/source/app.d rename to test/issue672-upgrade-optional/source/app.d diff --git a/test/new_tests/issue674-concurrent-dub/dub.json b/test/issue674-concurrent-dub/dub.json similarity index 100% rename from test/new_tests/issue674-concurrent-dub/dub.json rename to test/issue674-concurrent-dub/dub.json diff --git a/test/new_tests/issue674-concurrent-dub/source/app.d b/test/issue674-concurrent-dub/source/app.d similarity index 100% rename from test/new_tests/issue674-concurrent-dub/source/app.d rename to test/issue674-concurrent-dub/source/app.d diff --git a/test/new_tests/issue686-multiple-march/.gitignore b/test/issue686-multiple-march/.gitignore similarity index 100% rename from test/new_tests/issue686-multiple-march/.gitignore rename to test/issue686-multiple-march/.gitignore diff --git a/test/new_tests/issue686-multiple-march/dub.json b/test/issue686-multiple-march/dub.json similarity index 100% rename from test/new_tests/issue686-multiple-march/dub.json rename to test/issue686-multiple-march/dub.json diff --git a/test/new_tests/issue686-multiple-march/sample/a/dub.json b/test/issue686-multiple-march/sample/a/dub.json similarity index 100% rename from test/new_tests/issue686-multiple-march/sample/a/dub.json rename to test/issue686-multiple-march/sample/a/dub.json diff --git a/test/new_tests/issue686-multiple-march/sample/a/source/a.d b/test/issue686-multiple-march/sample/a/source/a.d similarity index 100% rename from test/new_tests/issue686-multiple-march/sample/a/source/a.d rename to test/issue686-multiple-march/sample/a/source/a.d diff --git a/test/new_tests/issue686-multiple-march/sample/b/dub.json b/test/issue686-multiple-march/sample/b/dub.json similarity index 100% rename from test/new_tests/issue686-multiple-march/sample/b/dub.json rename to test/issue686-multiple-march/sample/b/dub.json diff --git a/test/new_tests/issue686-multiple-march/sample/b/source/b.d b/test/issue686-multiple-march/sample/b/source/b.d similarity index 100% rename from test/new_tests/issue686-multiple-march/sample/b/source/b.d rename to test/issue686-multiple-march/sample/b/source/b.d diff --git a/test/new_tests/issue686-multiple-march/sample/main/dub.json b/test/issue686-multiple-march/sample/main/dub.json similarity index 100% rename from test/new_tests/issue686-multiple-march/sample/main/dub.json rename to test/issue686-multiple-march/sample/main/dub.json diff --git a/test/new_tests/issue686-multiple-march/sample/main/source/main.d b/test/issue686-multiple-march/sample/main/source/main.d similarity index 100% rename from test/new_tests/issue686-multiple-march/sample/main/source/main.d rename to test/issue686-multiple-march/sample/main/source/main.d diff --git a/test/new_tests/issue686-multiple-march/source/app.d b/test/issue686-multiple-march/source/app.d similarity index 100% rename from test/new_tests/issue686-multiple-march/source/app.d rename to test/issue686-multiple-march/source/app.d diff --git a/test/new_tests/issue754-path-selection-fail/.gitignore b/test/issue754-path-selection-fail/.gitignore similarity index 100% rename from test/new_tests/issue754-path-selection-fail/.gitignore rename to test/issue754-path-selection-fail/.gitignore diff --git a/test/new_tests/issue754-path-selection-fail/a-1.0/dub.sdl b/test/issue754-path-selection-fail/a-1.0/dub.sdl similarity index 100% rename from test/new_tests/issue754-path-selection-fail/a-1.0/dub.sdl rename to test/issue754-path-selection-fail/a-1.0/dub.sdl diff --git a/test/new_tests/issue754-path-selection-fail/a-1.0/source/a.d b/test/issue754-path-selection-fail/a-1.0/source/a.d similarity index 100% rename from test/new_tests/issue754-path-selection-fail/a-1.0/source/a.d rename to test/issue754-path-selection-fail/a-1.0/source/a.d diff --git a/test/new_tests/issue754-path-selection-fail/a-2.0/dub.sdl b/test/issue754-path-selection-fail/a-2.0/dub.sdl similarity index 100% rename from test/new_tests/issue754-path-selection-fail/a-2.0/dub.sdl rename to test/issue754-path-selection-fail/a-2.0/dub.sdl diff --git a/test/new_tests/issue754-path-selection-fail/dub.sdl b/test/issue754-path-selection-fail/dub.sdl similarity index 100% rename from test/new_tests/issue754-path-selection-fail/dub.sdl rename to test/issue754-path-selection-fail/dub.sdl diff --git a/test/new_tests/issue754-path-selection-fail/dub.selections.json b/test/issue754-path-selection-fail/dub.selections.json similarity index 100% rename from test/new_tests/issue754-path-selection-fail/dub.selections.json rename to test/issue754-path-selection-fail/dub.selections.json diff --git a/test/new_tests/issue754-path-selection-fail/source/app.d b/test/issue754-path-selection-fail/source/app.d similarity index 100% rename from test/new_tests/issue754-path-selection-fail/source/app.d rename to test/issue754-path-selection-fail/source/app.d diff --git a/test/new_tests/issue777-bogus-path-dependency/.gitignore b/test/issue777-bogus-path-dependency/.gitignore similarity index 100% rename from test/new_tests/issue777-bogus-path-dependency/.gitignore rename to test/issue777-bogus-path-dependency/.gitignore diff --git a/test/new_tests/issue777-bogus-path-dependency/b/a.d b/test/issue777-bogus-path-dependency/b/a.d similarity index 100% rename from test/new_tests/issue777-bogus-path-dependency/b/a.d rename to test/issue777-bogus-path-dependency/b/a.d diff --git a/test/new_tests/issue777-bogus-path-dependency/b/dub.sdl b/test/issue777-bogus-path-dependency/b/dub.sdl similarity index 100% rename from test/new_tests/issue777-bogus-path-dependency/b/dub.sdl rename to test/issue777-bogus-path-dependency/b/dub.sdl diff --git a/test/new_tests/issue777-bogus-path-dependency/c-err/dub.sdl b/test/issue777-bogus-path-dependency/c-err/dub.sdl similarity index 100% rename from test/new_tests/issue777-bogus-path-dependency/c-err/dub.sdl rename to test/issue777-bogus-path-dependency/c-err/dub.sdl diff --git a/test/new_tests/issue777-bogus-path-dependency/c-err/source/lib.d b/test/issue777-bogus-path-dependency/c-err/source/lib.d similarity index 100% rename from test/new_tests/issue777-bogus-path-dependency/c-err/source/lib.d rename to test/issue777-bogus-path-dependency/c-err/source/lib.d diff --git a/test/new_tests/issue777-bogus-path-dependency/c/dub.sdl b/test/issue777-bogus-path-dependency/c/dub.sdl similarity index 100% rename from test/new_tests/issue777-bogus-path-dependency/c/dub.sdl rename to test/issue777-bogus-path-dependency/c/dub.sdl diff --git a/test/new_tests/issue777-bogus-path-dependency/c/source/lib.d b/test/issue777-bogus-path-dependency/c/source/lib.d similarity index 100% rename from test/new_tests/issue777-bogus-path-dependency/c/source/lib.d rename to test/issue777-bogus-path-dependency/c/source/lib.d diff --git a/test/new_tests/issue777-bogus-path-dependency/dub.sdl b/test/issue777-bogus-path-dependency/dub.sdl similarity index 100% rename from test/new_tests/issue777-bogus-path-dependency/dub.sdl rename to test/issue777-bogus-path-dependency/dub.sdl diff --git a/test/new_tests/issue777-bogus-path-dependency/dub.selections.json b/test/issue777-bogus-path-dependency/dub.selections.json similarity index 100% rename from test/new_tests/issue777-bogus-path-dependency/dub.selections.json rename to test/issue777-bogus-path-dependency/dub.selections.json diff --git a/test/new_tests/issue777-bogus-path-dependency/source/app.d b/test/issue777-bogus-path-dependency/source/app.d similarity index 100% rename from test/new_tests/issue777-bogus-path-dependency/source/app.d rename to test/issue777-bogus-path-dependency/source/app.d diff --git a/test/new_tests/issue782-gtkd-pkg-config/.gitignore b/test/issue782-gtkd-pkg-config/.gitignore similarity index 100% rename from test/new_tests/issue782-gtkd-pkg-config/.gitignore rename to test/issue782-gtkd-pkg-config/.gitignore diff --git a/test/new_tests/issue782-gtkd-pkg-config/dub.json b/test/issue782-gtkd-pkg-config/dub.json similarity index 100% rename from test/new_tests/issue782-gtkd-pkg-config/dub.json rename to test/issue782-gtkd-pkg-config/dub.json diff --git a/test/new_tests/issue782-gtkd-pkg-config/sample/fake-gtkd/dub.json b/test/issue782-gtkd-pkg-config/sample/fake-gtkd/dub.json similarity index 100% rename from test/new_tests/issue782-gtkd-pkg-config/sample/fake-gtkd/dub.json rename to test/issue782-gtkd-pkg-config/sample/fake-gtkd/dub.json diff --git a/test/new_tests/issue782-gtkd-pkg-config/sample/fake-gtkd/pkgconfig/fake-gtkd.pc b/test/issue782-gtkd-pkg-config/sample/fake-gtkd/pkgconfig/fake-gtkd.pc similarity index 100% rename from test/new_tests/issue782-gtkd-pkg-config/sample/fake-gtkd/pkgconfig/fake-gtkd.pc rename to test/issue782-gtkd-pkg-config/sample/fake-gtkd/pkgconfig/fake-gtkd.pc diff --git a/test/new_tests/issue782-gtkd-pkg-config/sample/fake-gtkd/src/fakegtkd.d b/test/issue782-gtkd-pkg-config/sample/fake-gtkd/src/fakegtkd.d similarity index 100% rename from test/new_tests/issue782-gtkd-pkg-config/sample/fake-gtkd/src/fakegtkd.d rename to test/issue782-gtkd-pkg-config/sample/fake-gtkd/src/fakegtkd.d diff --git a/test/new_tests/issue782-gtkd-pkg-config/sample/fake-gtkd/src/lib.d b/test/issue782-gtkd-pkg-config/sample/fake-gtkd/src/lib.d similarity index 100% rename from test/new_tests/issue782-gtkd-pkg-config/sample/fake-gtkd/src/lib.d rename to test/issue782-gtkd-pkg-config/sample/fake-gtkd/src/lib.d diff --git a/test/new_tests/issue782-gtkd-pkg-config/sample/main/dub.json b/test/issue782-gtkd-pkg-config/sample/main/dub.json similarity index 100% rename from test/new_tests/issue782-gtkd-pkg-config/sample/main/dub.json rename to test/issue782-gtkd-pkg-config/sample/main/dub.json diff --git a/test/new_tests/issue782-gtkd-pkg-config/sample/main/src/app.d b/test/issue782-gtkd-pkg-config/sample/main/src/app.d similarity index 100% rename from test/new_tests/issue782-gtkd-pkg-config/sample/main/src/app.d rename to test/issue782-gtkd-pkg-config/sample/main/src/app.d diff --git a/test/new_tests/issue782-gtkd-pkg-config/source/app.d b/test/issue782-gtkd-pkg-config/source/app.d similarity index 100% rename from test/new_tests/issue782-gtkd-pkg-config/source/app.d rename to test/issue782-gtkd-pkg-config/source/app.d diff --git a/test/new_tests/issue782-gtkd-pkg-config/test.config b/test/issue782-gtkd-pkg-config/test.config similarity index 100% rename from test/new_tests/issue782-gtkd-pkg-config/test.config rename to test/issue782-gtkd-pkg-config/test.config diff --git a/test/new_tests/issue813-fixed-dependency/.gitignore b/test/issue813-fixed-dependency/.gitignore similarity index 100% rename from test/new_tests/issue813-fixed-dependency/.gitignore rename to test/issue813-fixed-dependency/.gitignore diff --git a/test/new_tests/issue813-fixed-dependency/dub.json b/test/issue813-fixed-dependency/dub.json similarity index 100% rename from test/new_tests/issue813-fixed-dependency/dub.json rename to test/issue813-fixed-dependency/dub.json diff --git a/test/new_tests/issue813-fixed-dependency/sample/main/dub.sdl b/test/issue813-fixed-dependency/sample/main/dub.sdl similarity index 100% rename from test/new_tests/issue813-fixed-dependency/sample/main/dub.sdl rename to test/issue813-fixed-dependency/sample/main/dub.sdl diff --git a/test/new_tests/issue813-fixed-dependency/sample/main/dub.selections.json b/test/issue813-fixed-dependency/sample/main/dub.selections.json similarity index 100% rename from test/new_tests/issue813-fixed-dependency/sample/main/dub.selections.json rename to test/issue813-fixed-dependency/sample/main/dub.selections.json diff --git a/test/new_tests/issue813-fixed-dependency/sample/main/src/app.d b/test/issue813-fixed-dependency/sample/main/src/app.d similarity index 100% rename from test/new_tests/issue813-fixed-dependency/sample/main/src/app.d rename to test/issue813-fixed-dependency/sample/main/src/app.d diff --git a/test/new_tests/issue813-fixed-dependency/sample/sub/dub.sdl b/test/issue813-fixed-dependency/sample/sub/dub.sdl similarity index 100% rename from test/new_tests/issue813-fixed-dependency/sample/sub/dub.sdl rename to test/issue813-fixed-dependency/sample/sub/dub.sdl diff --git a/test/new_tests/issue813-fixed-dependency/sample/sub/sub/dub.sdl b/test/issue813-fixed-dependency/sample/sub/sub/dub.sdl similarity index 100% rename from test/new_tests/issue813-fixed-dependency/sample/sub/sub/dub.sdl rename to test/issue813-fixed-dependency/sample/sub/sub/dub.sdl diff --git a/test/new_tests/issue813-fixed-dependency/sample/sub/sub/src/sub/test.d b/test/issue813-fixed-dependency/sample/sub/sub/src/sub/test.d similarity index 100% rename from test/new_tests/issue813-fixed-dependency/sample/sub/sub/src/sub/test.d rename to test/issue813-fixed-dependency/sample/sub/sub/src/sub/test.d diff --git a/test/new_tests/issue813-fixed-dependency/source/app.d b/test/issue813-fixed-dependency/source/app.d similarity index 100% rename from test/new_tests/issue813-fixed-dependency/source/app.d rename to test/issue813-fixed-dependency/source/app.d diff --git a/test/new_tests/issue813-pure-sub-dependency/.gitignore b/test/issue813-pure-sub-dependency/.gitignore similarity index 100% rename from test/new_tests/issue813-pure-sub-dependency/.gitignore rename to test/issue813-pure-sub-dependency/.gitignore diff --git a/test/new_tests/issue813-pure-sub-dependency/dub.json b/test/issue813-pure-sub-dependency/dub.json similarity index 100% rename from test/new_tests/issue813-pure-sub-dependency/dub.json rename to test/issue813-pure-sub-dependency/dub.json diff --git a/test/new_tests/issue813-pure-sub-dependency/sample/main/dub.sdl b/test/issue813-pure-sub-dependency/sample/main/dub.sdl similarity index 100% rename from test/new_tests/issue813-pure-sub-dependency/sample/main/dub.sdl rename to test/issue813-pure-sub-dependency/sample/main/dub.sdl diff --git a/test/new_tests/issue813-pure-sub-dependency/sample/main/src/app.d b/test/issue813-pure-sub-dependency/sample/main/src/app.d similarity index 100% rename from test/new_tests/issue813-pure-sub-dependency/sample/main/src/app.d rename to test/issue813-pure-sub-dependency/sample/main/src/app.d diff --git a/test/new_tests/issue813-pure-sub-dependency/sample/sub/dub.sdl b/test/issue813-pure-sub-dependency/sample/sub/dub.sdl similarity index 100% rename from test/new_tests/issue813-pure-sub-dependency/sample/sub/dub.sdl rename to test/issue813-pure-sub-dependency/sample/sub/dub.sdl diff --git a/test/new_tests/issue813-pure-sub-dependency/sample/sub/sub/dub.sdl b/test/issue813-pure-sub-dependency/sample/sub/sub/dub.sdl similarity index 100% rename from test/new_tests/issue813-pure-sub-dependency/sample/sub/sub/dub.sdl rename to test/issue813-pure-sub-dependency/sample/sub/sub/dub.sdl diff --git a/test/new_tests/issue813-pure-sub-dependency/sample/sub/sub/src/sub/test.d b/test/issue813-pure-sub-dependency/sample/sub/sub/src/sub/test.d similarity index 100% rename from test/new_tests/issue813-pure-sub-dependency/sample/sub/sub/src/sub/test.d rename to test/issue813-pure-sub-dependency/sample/sub/sub/src/sub/test.d diff --git a/test/new_tests/issue813-pure-sub-dependency/source/app.d b/test/issue813-pure-sub-dependency/source/app.d similarity index 100% rename from test/new_tests/issue813-pure-sub-dependency/source/app.d rename to test/issue813-pure-sub-dependency/source/app.d diff --git a/test/new_tests/issue820-extra-fields-after-convert/.gitignore b/test/issue820-extra-fields-after-convert/.gitignore similarity index 100% rename from test/new_tests/issue820-extra-fields-after-convert/.gitignore rename to test/issue820-extra-fields-after-convert/.gitignore diff --git a/test/new_tests/issue820-extra-fields-after-convert/dub.json b/test/issue820-extra-fields-after-convert/dub.json similarity index 100% rename from test/new_tests/issue820-extra-fields-after-convert/dub.json rename to test/issue820-extra-fields-after-convert/dub.json diff --git a/test/new_tests/issue820-extra-fields-after-convert/sample/dub.json b/test/issue820-extra-fields-after-convert/sample/dub.json similarity index 100% rename from test/new_tests/issue820-extra-fields-after-convert/sample/dub.json rename to test/issue820-extra-fields-after-convert/sample/dub.json diff --git a/test/new_tests/issue820-extra-fields-after-convert/source/app.d b/test/issue820-extra-fields-after-convert/source/app.d similarity index 100% rename from test/new_tests/issue820-extra-fields-after-convert/source/app.d rename to test/issue820-extra-fields-after-convert/source/app.d diff --git a/test/new_tests/issue838-custom-cache-paths/.gitignore b/test/issue838-custom-cache-paths/.gitignore similarity index 100% rename from test/new_tests/issue838-custom-cache-paths/.gitignore rename to test/issue838-custom-cache-paths/.gitignore diff --git a/test/new_tests/issue838-custom-cache-paths/dub.json b/test/issue838-custom-cache-paths/dub.json similarity index 100% rename from test/new_tests/issue838-custom-cache-paths/dub.json rename to test/issue838-custom-cache-paths/dub.json diff --git a/test/new_tests/issue838-custom-cache-paths/sample/cache/foo/1.0.0/foo/dub.sdl b/test/issue838-custom-cache-paths/sample/cache/foo/1.0.0/foo/dub.sdl similarity index 100% rename from test/new_tests/issue838-custom-cache-paths/sample/cache/foo/1.0.0/foo/dub.sdl rename to test/issue838-custom-cache-paths/sample/cache/foo/1.0.0/foo/dub.sdl diff --git a/test/new_tests/issue838-custom-cache-paths/sample/dub.sdl b/test/issue838-custom-cache-paths/sample/dub.sdl similarity index 100% rename from test/new_tests/issue838-custom-cache-paths/sample/dub.sdl rename to test/issue838-custom-cache-paths/sample/dub.sdl diff --git a/test/new_tests/issue838-custom-cache-paths/sample/source/app.d b/test/issue838-custom-cache-paths/sample/source/app.d similarity index 100% rename from test/new_tests/issue838-custom-cache-paths/sample/source/app.d rename to test/issue838-custom-cache-paths/sample/source/app.d diff --git a/test/new_tests/issue838-custom-cache-paths/source/app.d b/test/issue838-custom-cache-paths/source/app.d similarity index 100% rename from test/new_tests/issue838-custom-cache-paths/source/app.d rename to test/issue838-custom-cache-paths/source/app.d diff --git a/test/new_tests/issue877-auto-fetch-package-on-run/dub.json b/test/issue877-auto-fetch-package-on-run/dub.json similarity index 100% rename from test/new_tests/issue877-auto-fetch-package-on-run/dub.json rename to test/issue877-auto-fetch-package-on-run/dub.json diff --git a/test/new_tests/issue877-auto-fetch-package-on-run/source/app.d b/test/issue877-auto-fetch-package-on-run/source/app.d similarity index 100% rename from test/new_tests/issue877-auto-fetch-package-on-run/source/app.d rename to test/issue877-auto-fetch-package-on-run/source/app.d diff --git a/test/new_tests/issue884-init-defer-file-creation/dub.json b/test/issue884-init-defer-file-creation/dub.json similarity index 100% rename from test/new_tests/issue884-init-defer-file-creation/dub.json rename to test/issue884-init-defer-file-creation/dub.json diff --git a/test/new_tests/issue884-init-defer-file-creation/source/app.d b/test/issue884-init-defer-file-creation/source/app.d similarity index 100% rename from test/new_tests/issue884-init-defer-file-creation/source/app.d rename to test/issue884-init-defer-file-creation/source/app.d diff --git a/test/new_tests/issue895-local-configuration/.gitignore b/test/issue895-local-configuration/.gitignore similarity index 100% rename from test/new_tests/issue895-local-configuration/.gitignore rename to test/issue895-local-configuration/.gitignore diff --git a/test/new_tests/issue895-local-configuration/dub.json b/test/issue895-local-configuration/dub.json similarity index 100% rename from test/new_tests/issue895-local-configuration/dub.json rename to test/issue895-local-configuration/dub.json diff --git a/test/new_tests/issue895-local-configuration/sample/dub.json b/test/issue895-local-configuration/sample/dub.json similarity index 100% rename from test/new_tests/issue895-local-configuration/sample/dub.json rename to test/issue895-local-configuration/sample/dub.json diff --git a/test/new_tests/issue895-local-configuration/sample/source/app.d b/test/issue895-local-configuration/sample/source/app.d similarity index 100% rename from test/new_tests/issue895-local-configuration/sample/source/app.d rename to test/issue895-local-configuration/sample/source/app.d diff --git a/test/new_tests/issue895-local-configuration/source/app.d b/test/issue895-local-configuration/source/app.d similarity index 100% rename from test/new_tests/issue895-local-configuration/source/app.d rename to test/issue895-local-configuration/source/app.d diff --git a/test/new_tests/issue895-local-configuration/test.config b/test/issue895-local-configuration/test.config similarity index 100% rename from test/new_tests/issue895-local-configuration/test.config rename to test/issue895-local-configuration/test.config diff --git a/test/new_tests/issue923-subpackage-deps/.gitignore b/test/issue923-subpackage-deps/.gitignore similarity index 100% rename from test/new_tests/issue923-subpackage-deps/.gitignore rename to test/issue923-subpackage-deps/.gitignore diff --git a/test/new_tests/issue923-subpackage-deps/dub.json b/test/issue923-subpackage-deps/dub.json similarity index 100% rename from test/new_tests/issue923-subpackage-deps/dub.json rename to test/issue923-subpackage-deps/dub.json diff --git a/test/new_tests/issue923-subpackage-deps/sample/a/dub.sdl b/test/issue923-subpackage-deps/sample/a/dub.sdl similarity index 100% rename from test/new_tests/issue923-subpackage-deps/sample/a/dub.sdl rename to test/issue923-subpackage-deps/sample/a/dub.sdl diff --git a/test/new_tests/issue923-subpackage-deps/sample/b/dub.sdl b/test/issue923-subpackage-deps/sample/b/dub.sdl similarity index 100% rename from test/new_tests/issue923-subpackage-deps/sample/b/dub.sdl rename to test/issue923-subpackage-deps/sample/b/dub.sdl diff --git a/test/new_tests/issue923-subpackage-deps/sample/b/source/b.d b/test/issue923-subpackage-deps/sample/b/source/b.d similarity index 100% rename from test/new_tests/issue923-subpackage-deps/sample/b/source/b.d rename to test/issue923-subpackage-deps/sample/b/source/b.d diff --git a/test/new_tests/issue923-subpackage-deps/sample/main/dub.sdl b/test/issue923-subpackage-deps/sample/main/dub.sdl similarity index 100% rename from test/new_tests/issue923-subpackage-deps/sample/main/dub.sdl rename to test/issue923-subpackage-deps/sample/main/dub.sdl diff --git a/test/new_tests/issue923-subpackage-deps/sample/main/source/app.d b/test/issue923-subpackage-deps/sample/main/source/app.d similarity index 100% rename from test/new_tests/issue923-subpackage-deps/sample/main/source/app.d rename to test/issue923-subpackage-deps/sample/main/source/app.d diff --git a/test/new_tests/issue923-subpackage-deps/source/app.d b/test/issue923-subpackage-deps/source/app.d similarity index 100% rename from test/new_tests/issue923-subpackage-deps/source/app.d rename to test/issue923-subpackage-deps/source/app.d diff --git a/test/new_tests/issue934-path-dep/.gitignore b/test/issue934-path-dep/.gitignore similarity index 100% rename from test/new_tests/issue934-path-dep/.gitignore rename to test/issue934-path-dep/.gitignore diff --git a/test/new_tests/issue934-path-dep/dub.json b/test/issue934-path-dep/dub.json similarity index 100% rename from test/new_tests/issue934-path-dep/dub.json rename to test/issue934-path-dep/dub.json diff --git a/test/new_tests/issue934-path-dep/sample/a/dub.sdl b/test/issue934-path-dep/sample/a/dub.sdl similarity index 100% rename from test/new_tests/issue934-path-dep/sample/a/dub.sdl rename to test/issue934-path-dep/sample/a/dub.sdl diff --git a/test/new_tests/issue934-path-dep/sample/b/dub.sdl b/test/issue934-path-dep/sample/b/dub.sdl similarity index 100% rename from test/new_tests/issue934-path-dep/sample/b/dub.sdl rename to test/issue934-path-dep/sample/b/dub.sdl diff --git a/test/new_tests/issue934-path-dep/sample/b/source/b.d b/test/issue934-path-dep/sample/b/source/b.d similarity index 100% rename from test/new_tests/issue934-path-dep/sample/b/source/b.d rename to test/issue934-path-dep/sample/b/source/b.d diff --git a/test/new_tests/issue934-path-dep/sample/main/dub.sdl b/test/issue934-path-dep/sample/main/dub.sdl similarity index 100% rename from test/new_tests/issue934-path-dep/sample/main/dub.sdl rename to test/issue934-path-dep/sample/main/dub.sdl diff --git a/test/new_tests/issue934-path-dep/sample/main/source/app.d b/test/issue934-path-dep/sample/main/source/app.d similarity index 100% rename from test/new_tests/issue934-path-dep/sample/main/source/app.d rename to test/issue934-path-dep/sample/main/source/app.d diff --git a/test/new_tests/issue934-path-dep/source/app.d b/test/issue934-path-dep/source/app.d similarity index 100% rename from test/new_tests/issue934-path-dep/source/app.d rename to test/issue934-path-dep/source/app.d diff --git a/test/new_tests/issue959-path-based-subpack-dep/.gitignore b/test/issue959-path-based-subpack-dep/.gitignore similarity index 100% rename from test/new_tests/issue959-path-based-subpack-dep/.gitignore rename to test/issue959-path-based-subpack-dep/.gitignore diff --git a/test/new_tests/issue959-path-based-subpack-dep/dub.sdl b/test/issue959-path-based-subpack-dep/dub.sdl similarity index 100% rename from test/new_tests/issue959-path-based-subpack-dep/dub.sdl rename to test/issue959-path-based-subpack-dep/dub.sdl diff --git a/test/new_tests/issue959-path-based-subpack-dep/foo/dub.sdl b/test/issue959-path-based-subpack-dep/foo/dub.sdl similarity index 100% rename from test/new_tests/issue959-path-based-subpack-dep/foo/dub.sdl rename to test/issue959-path-based-subpack-dep/foo/dub.sdl diff --git a/test/new_tests/issue959-path-based-subpack-dep/main.d b/test/issue959-path-based-subpack-dep/main.d similarity index 100% rename from test/new_tests/issue959-path-based-subpack-dep/main.d rename to test/issue959-path-based-subpack-dep/main.d diff --git a/test/new_tests/issue97-targettype-none-nodeps/.gitignore b/test/issue97-targettype-none-nodeps/.gitignore similarity index 100% rename from test/new_tests/issue97-targettype-none-nodeps/.gitignore rename to test/issue97-targettype-none-nodeps/.gitignore diff --git a/test/new_tests/issue97-targettype-none-nodeps/a/dub.sdl b/test/issue97-targettype-none-nodeps/a/dub.sdl similarity index 100% rename from test/new_tests/issue97-targettype-none-nodeps/a/dub.sdl rename to test/issue97-targettype-none-nodeps/a/dub.sdl diff --git a/test/new_tests/issue97-targettype-none-nodeps/a/source/app.d b/test/issue97-targettype-none-nodeps/a/source/app.d similarity index 100% rename from test/new_tests/issue97-targettype-none-nodeps/a/source/app.d rename to test/issue97-targettype-none-nodeps/a/source/app.d diff --git a/test/new_tests/issue97-targettype-none-nodeps/b/dub.sdl b/test/issue97-targettype-none-nodeps/b/dub.sdl similarity index 100% rename from test/new_tests/issue97-targettype-none-nodeps/b/dub.sdl rename to test/issue97-targettype-none-nodeps/b/dub.sdl diff --git a/test/new_tests/issue97-targettype-none-nodeps/b/source/app.d b/test/issue97-targettype-none-nodeps/b/source/app.d similarity index 100% rename from test/new_tests/issue97-targettype-none-nodeps/b/source/app.d rename to test/issue97-targettype-none-nodeps/b/source/app.d diff --git a/test/new_tests/issue97-targettype-none-nodeps/dub.sdl b/test/issue97-targettype-none-nodeps/dub.sdl similarity index 100% rename from test/new_tests/issue97-targettype-none-nodeps/dub.sdl rename to test/issue97-targettype-none-nodeps/dub.sdl diff --git a/test/new_tests/issue97-targettype-none-nodeps/test.config b/test/issue97-targettype-none-nodeps/test.config similarity index 100% rename from test/new_tests/issue97-targettype-none-nodeps/test.config rename to test/issue97-targettype-none-nodeps/test.config diff --git a/test/new_tests/issue97-targettype-none-onerecipe/.gitignore b/test/issue97-targettype-none-onerecipe/.gitignore similarity index 100% rename from test/new_tests/issue97-targettype-none-onerecipe/.gitignore rename to test/issue97-targettype-none-onerecipe/.gitignore diff --git a/test/new_tests/issue97-targettype-none-onerecipe/a/source/app.d b/test/issue97-targettype-none-onerecipe/a/source/app.d similarity index 100% rename from test/new_tests/issue97-targettype-none-onerecipe/a/source/app.d rename to test/issue97-targettype-none-onerecipe/a/source/app.d diff --git a/test/new_tests/issue97-targettype-none-onerecipe/b/source/app.d b/test/issue97-targettype-none-onerecipe/b/source/app.d similarity index 100% rename from test/new_tests/issue97-targettype-none-onerecipe/b/source/app.d rename to test/issue97-targettype-none-onerecipe/b/source/app.d diff --git a/test/new_tests/issue97-targettype-none-onerecipe/dub.sdl b/test/issue97-targettype-none-onerecipe/dub.sdl similarity index 100% rename from test/new_tests/issue97-targettype-none-onerecipe/dub.sdl rename to test/issue97-targettype-none-onerecipe/dub.sdl diff --git a/test/new_tests/issue97-targettype-none-onerecipe/test.config b/test/issue97-targettype-none-onerecipe/test.config similarity index 100% rename from test/new_tests/issue97-targettype-none-onerecipe/test.config rename to test/issue97-targettype-none-onerecipe/test.config diff --git a/test/new_tests/issue97-targettype-none/.gitignore b/test/issue97-targettype-none/.gitignore similarity index 100% rename from test/new_tests/issue97-targettype-none/.gitignore rename to test/issue97-targettype-none/.gitignore diff --git a/test/new_tests/issue97-targettype-none/dub.json b/test/issue97-targettype-none/dub.json similarity index 100% rename from test/new_tests/issue97-targettype-none/dub.json rename to test/issue97-targettype-none/dub.json diff --git a/test/new_tests/issue97-targettype-none/sample/a/dub.sdl b/test/issue97-targettype-none/sample/a/dub.sdl similarity index 100% rename from test/new_tests/issue97-targettype-none/sample/a/dub.sdl rename to test/issue97-targettype-none/sample/a/dub.sdl diff --git a/test/new_tests/issue97-targettype-none/sample/a/source/app.d b/test/issue97-targettype-none/sample/a/source/app.d similarity index 100% rename from test/new_tests/issue97-targettype-none/sample/a/source/app.d rename to test/issue97-targettype-none/sample/a/source/app.d diff --git a/test/new_tests/issue97-targettype-none/sample/b/dub.sdl b/test/issue97-targettype-none/sample/b/dub.sdl similarity index 100% rename from test/new_tests/issue97-targettype-none/sample/b/dub.sdl rename to test/issue97-targettype-none/sample/b/dub.sdl diff --git a/test/new_tests/issue97-targettype-none/sample/b/source/app.d b/test/issue97-targettype-none/sample/b/source/app.d similarity index 100% rename from test/new_tests/issue97-targettype-none/sample/b/source/app.d rename to test/issue97-targettype-none/sample/b/source/app.d diff --git a/test/new_tests/issue97-targettype-none/sample/dub.sdl b/test/issue97-targettype-none/sample/dub.sdl similarity index 100% rename from test/new_tests/issue97-targettype-none/sample/dub.sdl rename to test/issue97-targettype-none/sample/dub.sdl diff --git a/test/new_tests/issue97-targettype-none/source/app.d b/test/issue97-targettype-none/source/app.d similarity index 100% rename from test/new_tests/issue97-targettype-none/source/app.d rename to test/issue97-targettype-none/source/app.d diff --git a/test/new_tests/issue990-download-optional-selected/.gitignore b/test/issue990-download-optional-selected/.gitignore similarity index 100% rename from test/new_tests/issue990-download-optional-selected/.gitignore rename to test/issue990-download-optional-selected/.gitignore diff --git a/test/new_tests/issue990-download-optional-selected/dub.json b/test/issue990-download-optional-selected/dub.json similarity index 100% rename from test/new_tests/issue990-download-optional-selected/dub.json rename to test/issue990-download-optional-selected/dub.json diff --git a/test/new_tests/issue990-download-optional-selected/sample/dub.sdl b/test/issue990-download-optional-selected/sample/dub.sdl similarity index 100% rename from test/new_tests/issue990-download-optional-selected/sample/dub.sdl rename to test/issue990-download-optional-selected/sample/dub.sdl diff --git a/test/new_tests/issue990-download-optional-selected/sample/dub.selections.json b/test/issue990-download-optional-selected/sample/dub.selections.json similarity index 100% rename from test/new_tests/issue990-download-optional-selected/sample/dub.selections.json rename to test/issue990-download-optional-selected/sample/dub.selections.json diff --git a/test/new_tests/issue990-download-optional-selected/sample/source/app.d b/test/issue990-download-optional-selected/sample/source/app.d similarity index 100% rename from test/new_tests/issue990-download-optional-selected/sample/source/app.d rename to test/issue990-download-optional-selected/sample/source/app.d diff --git a/test/new_tests/issue990-download-optional-selected/source/app.d b/test/issue990-download-optional-selected/source/app.d similarity index 100% rename from test/new_tests/issue990-download-optional-selected/source/app.d rename to test/issue990-download-optional-selected/source/app.d diff --git a/test/new_tests/mutex-main-1/dub.json b/test/mutex-main-1/dub.json similarity index 100% rename from test/new_tests/mutex-main-1/dub.json rename to test/mutex-main-1/dub.json diff --git a/test/new_tests/mutex-main-1/source/app.d b/test/mutex-main-1/source/app.d similarity index 100% rename from test/new_tests/mutex-main-1/source/app.d rename to test/mutex-main-1/source/app.d diff --git a/test/new_tests/mutex-main-1/source/app2.d b/test/mutex-main-1/source/app2.d similarity index 100% rename from test/new_tests/mutex-main-1/source/app2.d rename to test/mutex-main-1/source/app2.d diff --git a/test/new_tests/mutex-main-1/test.config b/test/mutex-main-1/test.config similarity index 100% rename from test/new_tests/mutex-main-1/test.config rename to test/mutex-main-1/test.config diff --git a/test/new_tests/mutex-main-2/dub.json b/test/mutex-main-2/dub.json similarity index 100% rename from test/new_tests/mutex-main-2/dub.json rename to test/mutex-main-2/dub.json diff --git a/test/new_tests/mutex-main-2/source/app.d b/test/mutex-main-2/source/app.d similarity index 100% rename from test/new_tests/mutex-main-2/source/app.d rename to test/mutex-main-2/source/app.d diff --git a/test/new_tests/mutex-main-2/source/app2.d b/test/mutex-main-2/source/app2.d similarity index 100% rename from test/new_tests/mutex-main-2/source/app2.d rename to test/mutex-main-2/source/app2.d diff --git a/test/new_tests/mutex-main-2/test.config b/test/mutex-main-2/test.config similarity index 100% rename from test/new_tests/mutex-main-2/test.config rename to test/mutex-main-2/test.config diff --git a/test/new_tests/mutex-main-3/dub.json b/test/mutex-main-3/dub.json similarity index 100% rename from test/new_tests/mutex-main-3/dub.json rename to test/mutex-main-3/dub.json diff --git a/test/new_tests/mutex-main-3/source/app.d b/test/mutex-main-3/source/app.d similarity index 100% rename from test/new_tests/mutex-main-3/source/app.d rename to test/mutex-main-3/source/app.d diff --git a/test/new_tests/mutex-main-3/source/app2.d b/test/mutex-main-3/source/app2.d similarity index 100% rename from test/new_tests/mutex-main-3/source/app2.d rename to test/mutex-main-3/source/app2.d diff --git a/test/new_tests/mutex-main-3/test.config b/test/mutex-main-3/test.config similarity index 100% rename from test/new_tests/mutex-main-3/test.config rename to test/mutex-main-3/test.config diff --git a/test/new_tests/.gitignore b/test/new_tests/.gitignore deleted file mode 100644 index 5a6d94c310..0000000000 --- a/test/new_tests/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -test.log -*/* -!*/dub.json -!*/dub.sdl -!*/package.json -!*/run.d -!*/run.sh -!*/source -!*/.gitignore -!*/test.config -!extra/* diff --git a/test/new_tests/path-subpackage-ref/.gitignore b/test/path-subpackage-ref/.gitignore similarity index 100% rename from test/new_tests/path-subpackage-ref/.gitignore rename to test/path-subpackage-ref/.gitignore diff --git a/test/new_tests/path-subpackage-ref/dub.json b/test/path-subpackage-ref/dub.json similarity index 100% rename from test/new_tests/path-subpackage-ref/dub.json rename to test/path-subpackage-ref/dub.json diff --git a/test/new_tests/path-subpackage-ref/source/app.d b/test/path-subpackage-ref/source/app.d similarity index 100% rename from test/new_tests/path-subpackage-ref/source/app.d rename to test/path-subpackage-ref/source/app.d diff --git a/test/new_tests/path-subpackage-ref/subpack/dub.json b/test/path-subpackage-ref/subpack/dub.json similarity index 100% rename from test/new_tests/path-subpackage-ref/subpack/dub.json rename to test/path-subpackage-ref/subpack/dub.json diff --git a/test/new_tests/path-subpackage-ref/subpack/source/lib.d b/test/path-subpackage-ref/subpack/source/lib.d similarity index 100% rename from test/new_tests/path-subpackage-ref/subpack/source/lib.d rename to test/path-subpackage-ref/subpack/source/lib.d diff --git a/test/new_tests/pr1549-dub-exe-var/.gitignore b/test/pr1549-dub-exe-var/.gitignore similarity index 100% rename from test/new_tests/pr1549-dub-exe-var/.gitignore rename to test/pr1549-dub-exe-var/.gitignore diff --git a/test/new_tests/pr1549-dub-exe-var/dub.json b/test/pr1549-dub-exe-var/dub.json similarity index 100% rename from test/new_tests/pr1549-dub-exe-var/dub.json rename to test/pr1549-dub-exe-var/dub.json diff --git a/test/new_tests/pr1549-dub-exe-var/sample/dub.sdl b/test/pr1549-dub-exe-var/sample/dub.sdl similarity index 100% rename from test/new_tests/pr1549-dub-exe-var/sample/dub.sdl rename to test/pr1549-dub-exe-var/sample/dub.sdl diff --git a/test/new_tests/pr1549-dub-exe-var/sample/setmsg.d b/test/pr1549-dub-exe-var/sample/setmsg.d similarity index 100% rename from test/new_tests/pr1549-dub-exe-var/sample/setmsg.d rename to test/pr1549-dub-exe-var/sample/setmsg.d diff --git a/test/new_tests/pr1549-dub-exe-var/sample/source/app.d b/test/pr1549-dub-exe-var/sample/source/app.d similarity index 100% rename from test/new_tests/pr1549-dub-exe-var/sample/source/app.d rename to test/pr1549-dub-exe-var/sample/source/app.d diff --git a/test/new_tests/pr1549-dub-exe-var/source/app.d b/test/pr1549-dub-exe-var/source/app.d similarity index 100% rename from test/new_tests/pr1549-dub-exe-var/source/app.d rename to test/pr1549-dub-exe-var/source/app.d diff --git a/test/new_tests/pr2642-cache-db/dub.sdl b/test/pr2642-cache-db/dub.sdl similarity index 100% rename from test/new_tests/pr2642-cache-db/dub.sdl rename to test/pr2642-cache-db/dub.sdl diff --git a/test/new_tests/pr2642-cache-db/source/test_cache_db.d b/test/pr2642-cache-db/source/test_cache_db.d similarity index 100% rename from test/new_tests/pr2642-cache-db/source/test_cache_db.d rename to test/pr2642-cache-db/source/test_cache_db.d diff --git a/test/new_tests/pr2644-describe-artifact-path/dub.sdl b/test/pr2644-describe-artifact-path/dub.sdl similarity index 100% rename from test/new_tests/pr2644-describe-artifact-path/dub.sdl rename to test/pr2644-describe-artifact-path/dub.sdl diff --git a/test/new_tests/pr2644-describe-artifact-path/source/describe_artifact_path.d b/test/pr2644-describe-artifact-path/source/describe_artifact_path.d similarity index 100% rename from test/new_tests/pr2644-describe-artifact-path/source/describe_artifact_path.d rename to test/pr2644-describe-artifact-path/source/describe_artifact_path.d diff --git a/test/new_tests/pr2647-build-deep/.gitignore b/test/pr2647-build-deep/.gitignore similarity index 100% rename from test/new_tests/pr2647-build-deep/.gitignore rename to test/pr2647-build-deep/.gitignore diff --git a/test/new_tests/pr2647-build-deep/dub.sdl b/test/pr2647-build-deep/dub.sdl similarity index 100% rename from test/new_tests/pr2647-build-deep/dub.sdl rename to test/pr2647-build-deep/dub.sdl diff --git a/test/new_tests/pr2647-build-deep/sample/dub.sdl b/test/pr2647-build-deep/sample/dub.sdl similarity index 100% rename from test/new_tests/pr2647-build-deep/sample/dub.sdl rename to test/pr2647-build-deep/sample/dub.sdl diff --git a/test/new_tests/pr2647-build-deep/sample/source/lib.d b/test/pr2647-build-deep/sample/source/lib.d similarity index 100% rename from test/new_tests/pr2647-build-deep/sample/source/lib.d rename to test/pr2647-build-deep/sample/source/lib.d diff --git a/test/new_tests/pr2647-build-deep/source/test_build_deep.d b/test/pr2647-build-deep/source/test_build_deep.d similarity index 100% rename from test/new_tests/pr2647-build-deep/source/test_build_deep.d rename to test/pr2647-build-deep/source/test_build_deep.d diff --git a/test/new_tests/removed-dub-obj/.gitignore b/test/removed-dub-obj/.gitignore similarity index 100% rename from test/new_tests/removed-dub-obj/.gitignore rename to test/removed-dub-obj/.gitignore diff --git a/test/new_tests/removed-dub-obj/dub.json b/test/removed-dub-obj/dub.json similarity index 100% rename from test/new_tests/removed-dub-obj/dub.json rename to test/removed-dub-obj/dub.json diff --git a/test/new_tests/removed-dub-obj/sample/dub.sdl b/test/removed-dub-obj/sample/dub.sdl similarity index 100% rename from test/new_tests/removed-dub-obj/sample/dub.sdl rename to test/removed-dub-obj/sample/dub.sdl diff --git a/test/new_tests/removed-dub-obj/sample/source/test.d b/test/removed-dub-obj/sample/source/test.d similarity index 100% rename from test/new_tests/removed-dub-obj/sample/source/test.d rename to test/removed-dub-obj/sample/source/test.d diff --git a/test/new_tests/removed-dub-obj/source/app.d b/test/removed-dub-obj/source/app.d similarity index 100% rename from test/new_tests/removed-dub-obj/source/app.d rename to test/removed-dub-obj/source/app.d diff --git a/test/run_unittest/source/app.d b/test/run_unittest/source/app.d index a451e4b47c..e22bba7e70 100644 --- a/test/run_unittest/source/app.d +++ b/test/run_unittest/source/app.d @@ -28,7 +28,7 @@ int main(string[] args) { return 0; } - auto testDir = __FILE_FULL_PATH__.dirName.dirName.dirName.buildPath("new_tests"); + auto testDir = __FILE_FULL_PATH__.dirName.dirName.dirName; chdir(testDir); ErrorSink sink; diff --git a/test/run_unittest/source/run_unittest/runner/config.d b/test/run_unittest/source/run_unittest/runner/config.d index eb3d865470..03e73eb1ce 100644 --- a/test/run_unittest/source/run_unittest/runner/config.d +++ b/test/run_unittest/source/run_unittest/runner/config.d @@ -50,7 +50,7 @@ RunnerConfig generateRunnerConfig(ErrorSink sink) { } import std.path; - immutable fallbackPath = buildNormalizedPath(absolutePath("../../bin/dub")); + immutable fallbackPath = buildNormalizedPath(absolutePath("../bin/dub")); config.dubPath = environment.get("DUB", fallbackPath); return config; diff --git a/test/run_unittest/source/run_unittest/runner/runner.d b/test/run_unittest/source/run_unittest/runner/runner.d index a952eebd5f..bb79845321 100644 --- a/test/run_unittest/source/run_unittest/runner/runner.d +++ b/test/run_unittest/source/run_unittest/runner/runner.d @@ -49,7 +49,7 @@ struct Runner { const testCases = dirEntries(".", SpanMode.shallow) .filter!`a.isDir` - .filter!(a => !canFind(["extra", "common"], a.baseName)) + .filter!(a => !canFind(["extra", "common", "run_unittest"], a.baseName)) .filter!(entry => entry.name.matches(patterns)) .map!(a => a.name.baseName) .array; diff --git a/test/new_tests/sdl-package-simple/dub.sdl b/test/sdl-package-simple/dub.sdl similarity index 100% rename from test/new_tests/sdl-package-simple/dub.sdl rename to test/sdl-package-simple/dub.sdl diff --git a/test/new_tests/sdl-package-simple/source/app.d b/test/sdl-package-simple/source/app.d similarity index 100% rename from test/new_tests/sdl-package-simple/source/app.d rename to test/sdl-package-simple/source/app.d diff --git a/test/new_tests/single-file-sdl-default-name/.gitignore b/test/single-file-sdl-default-name/.gitignore similarity index 100% rename from test/new_tests/single-file-sdl-default-name/.gitignore rename to test/single-file-sdl-default-name/.gitignore diff --git a/test/new_tests/single-file-sdl-default-name/dub.json b/test/single-file-sdl-default-name/dub.json similarity index 100% rename from test/new_tests/single-file-sdl-default-name/dub.json rename to test/single-file-sdl-default-name/dub.json diff --git a/test/new_tests/single-file-sdl-default-name/single-file-sdl-default-name-sample.d b/test/single-file-sdl-default-name/single-file-sdl-default-name-sample.d similarity index 100% rename from test/new_tests/single-file-sdl-default-name/single-file-sdl-default-name-sample.d rename to test/single-file-sdl-default-name/single-file-sdl-default-name-sample.d diff --git a/test/new_tests/single-file-sdl-default-name/source/app.d b/test/single-file-sdl-default-name/source/app.d similarity index 100% rename from test/new_tests/single-file-sdl-default-name/source/app.d rename to test/single-file-sdl-default-name/source/app.d diff --git a/test/new_tests/subpackage-common-with-sourcefile-globbing/.gitignore b/test/subpackage-common-with-sourcefile-globbing/.gitignore similarity index 100% rename from test/new_tests/subpackage-common-with-sourcefile-globbing/.gitignore rename to test/subpackage-common-with-sourcefile-globbing/.gitignore diff --git a/test/new_tests/subpackage-common-with-sourcefile-globbing/dub.json b/test/subpackage-common-with-sourcefile-globbing/dub.json similarity index 100% rename from test/new_tests/subpackage-common-with-sourcefile-globbing/dub.json rename to test/subpackage-common-with-sourcefile-globbing/dub.json diff --git a/test/new_tests/subpackage-common-with-sourcefile-globbing/sample/code/mypackage/client/app.d b/test/subpackage-common-with-sourcefile-globbing/sample/code/mypackage/client/app.d similarity index 100% rename from test/new_tests/subpackage-common-with-sourcefile-globbing/sample/code/mypackage/client/app.d rename to test/subpackage-common-with-sourcefile-globbing/sample/code/mypackage/client/app.d diff --git a/test/new_tests/subpackage-common-with-sourcefile-globbing/sample/code/mypackage/client/extra.d b/test/subpackage-common-with-sourcefile-globbing/sample/code/mypackage/client/extra.d similarity index 100% rename from test/new_tests/subpackage-common-with-sourcefile-globbing/sample/code/mypackage/client/extra.d rename to test/subpackage-common-with-sourcefile-globbing/sample/code/mypackage/client/extra.d diff --git a/test/new_tests/subpackage-common-with-sourcefile-globbing/sample/code/mypackage/common/blah.d b/test/subpackage-common-with-sourcefile-globbing/sample/code/mypackage/common/blah.d similarity index 100% rename from test/new_tests/subpackage-common-with-sourcefile-globbing/sample/code/mypackage/common/blah.d rename to test/subpackage-common-with-sourcefile-globbing/sample/code/mypackage/common/blah.d diff --git a/test/new_tests/subpackage-common-with-sourcefile-globbing/sample/code/mypackage/server/app.d b/test/subpackage-common-with-sourcefile-globbing/sample/code/mypackage/server/app.d similarity index 100% rename from test/new_tests/subpackage-common-with-sourcefile-globbing/sample/code/mypackage/server/app.d rename to test/subpackage-common-with-sourcefile-globbing/sample/code/mypackage/server/app.d diff --git a/test/new_tests/subpackage-common-with-sourcefile-globbing/sample/code/mypackage/server/extra.d b/test/subpackage-common-with-sourcefile-globbing/sample/code/mypackage/server/extra.d similarity index 100% rename from test/new_tests/subpackage-common-with-sourcefile-globbing/sample/code/mypackage/server/extra.d rename to test/subpackage-common-with-sourcefile-globbing/sample/code/mypackage/server/extra.d diff --git a/test/new_tests/subpackage-common-with-sourcefile-globbing/sample/dub.sdl b/test/subpackage-common-with-sourcefile-globbing/sample/dub.sdl similarity index 100% rename from test/new_tests/subpackage-common-with-sourcefile-globbing/sample/dub.sdl rename to test/subpackage-common-with-sourcefile-globbing/sample/dub.sdl diff --git a/test/new_tests/subpackage-common-with-sourcefile-globbing/source/app.d b/test/subpackage-common-with-sourcefile-globbing/source/app.d similarity index 100% rename from test/new_tests/subpackage-common-with-sourcefile-globbing/source/app.d rename to test/subpackage-common-with-sourcefile-globbing/source/app.d diff --git a/test/new_tests/subpackage-ref/dub.json b/test/subpackage-ref/dub.json similarity index 100% rename from test/new_tests/subpackage-ref/dub.json rename to test/subpackage-ref/dub.json diff --git a/test/new_tests/subpackage-ref/source/app.d b/test/subpackage-ref/source/app.d similarity index 100% rename from test/new_tests/subpackage-ref/source/app.d rename to test/subpackage-ref/source/app.d diff --git a/test/new_tests/test-upgrade-subpackages/.gitignore b/test/test-upgrade-subpackages/.gitignore similarity index 100% rename from test/new_tests/test-upgrade-subpackages/.gitignore rename to test/test-upgrade-subpackages/.gitignore diff --git a/test/new_tests/test-upgrade-subpackages/dub.json b/test/test-upgrade-subpackages/dub.json similarity index 100% rename from test/new_tests/test-upgrade-subpackages/dub.json rename to test/test-upgrade-subpackages/dub.json diff --git a/test/new_tests/test-upgrade-subpackages/sample/dub.json b/test/test-upgrade-subpackages/sample/dub.json similarity index 100% rename from test/new_tests/test-upgrade-subpackages/sample/dub.json rename to test/test-upgrade-subpackages/sample/dub.json diff --git a/test/new_tests/test-upgrade-subpackages/sample/source/app.d b/test/test-upgrade-subpackages/sample/source/app.d similarity index 100% rename from test/new_tests/test-upgrade-subpackages/sample/source/app.d rename to test/test-upgrade-subpackages/sample/source/app.d diff --git a/test/new_tests/test-upgrade-subpackages/sample/subpack/dub.json b/test/test-upgrade-subpackages/sample/subpack/dub.json similarity index 100% rename from test/new_tests/test-upgrade-subpackages/sample/subpack/dub.json rename to test/test-upgrade-subpackages/sample/subpack/dub.json diff --git a/test/new_tests/test-upgrade-subpackages/sample/subpack/source/lib.d b/test/test-upgrade-subpackages/sample/subpack/source/lib.d similarity index 100% rename from test/new_tests/test-upgrade-subpackages/sample/subpack/source/lib.d rename to test/test-upgrade-subpackages/sample/subpack/source/lib.d diff --git a/test/new_tests/test-upgrade-subpackages/source/app.d b/test/test-upgrade-subpackages/source/app.d similarity index 100% rename from test/new_tests/test-upgrade-subpackages/source/app.d rename to test/test-upgrade-subpackages/source/app.d diff --git a/test/new_tests/test-version-opt/dub.json b/test/test-version-opt/dub.json similarity index 100% rename from test/new_tests/test-version-opt/dub.json rename to test/test-version-opt/dub.json diff --git a/test/new_tests/test-version-opt/source/app.d b/test/test-version-opt/source/app.d similarity index 100% rename from test/new_tests/test-version-opt/source/app.d rename to test/test-version-opt/source/app.d diff --git a/test/new_tests/timeout/dub.json b/test/timeout/dub.json similarity index 100% rename from test/new_tests/timeout/dub.json rename to test/timeout/dub.json diff --git a/test/new_tests/timeout/source/app.d b/test/timeout/source/app.d similarity index 100% rename from test/new_tests/timeout/source/app.d rename to test/timeout/source/app.d diff --git a/test/new_tests/unittest-cov-ctfe/dub.sdl b/test/unittest-cov-ctfe/dub.sdl similarity index 100% rename from test/new_tests/unittest-cov-ctfe/dub.sdl rename to test/unittest-cov-ctfe/dub.sdl diff --git a/test/new_tests/unittest-cov-ctfe/source/mod.d b/test/unittest-cov-ctfe/source/mod.d similarity index 100% rename from test/new_tests/unittest-cov-ctfe/source/mod.d rename to test/unittest-cov-ctfe/source/mod.d diff --git a/test/new_tests/unittest-cov-ctfe/test.config b/test/unittest-cov-ctfe/test.config similarity index 100% rename from test/new_tests/unittest-cov-ctfe/test.config rename to test/unittest-cov-ctfe/test.config diff --git a/test/new_tests/use-c-sources/dub.json b/test/use-c-sources/dub.json similarity index 100% rename from test/new_tests/use-c-sources/dub.json rename to test/use-c-sources/dub.json diff --git a/test/new_tests/use-c-sources/source/app.d b/test/use-c-sources/source/app.d similarity index 100% rename from test/new_tests/use-c-sources/source/app.d rename to test/use-c-sources/source/app.d diff --git a/test/new_tests/use-c-sources/source/some_c_code.c b/test/use-c-sources/source/some_c_code.c similarity index 100% rename from test/new_tests/use-c-sources/source/some_c_code.c rename to test/use-c-sources/source/some_c_code.c diff --git a/test/new_tests/use-c-sources/source/some_c_code.h b/test/use-c-sources/source/some_c_code.h similarity index 100% rename from test/new_tests/use-c-sources/source/some_c_code.h rename to test/use-c-sources/source/some_c_code.h diff --git a/test/new_tests/use-c-sources/test.config b/test/use-c-sources/test.config similarity index 100% rename from test/new_tests/use-c-sources/test.config rename to test/use-c-sources/test.config diff --git a/test/new_tests/version-filters-diamond/.gitignore b/test/version-filters-diamond/.gitignore similarity index 100% rename from test/new_tests/version-filters-diamond/.gitignore rename to test/version-filters-diamond/.gitignore diff --git a/test/new_tests/version-filters-diamond/daughter/dub.sdl b/test/version-filters-diamond/daughter/dub.sdl similarity index 100% rename from test/new_tests/version-filters-diamond/daughter/dub.sdl rename to test/version-filters-diamond/daughter/dub.sdl diff --git a/test/new_tests/version-filters-diamond/daughter/source/dummy.d b/test/version-filters-diamond/daughter/source/dummy.d similarity index 100% rename from test/new_tests/version-filters-diamond/daughter/source/dummy.d rename to test/version-filters-diamond/daughter/source/dummy.d diff --git a/test/new_tests/version-filters-diamond/diamond/.gitignore b/test/version-filters-diamond/diamond/.gitignore similarity index 100% rename from test/new_tests/version-filters-diamond/diamond/.gitignore rename to test/version-filters-diamond/diamond/.gitignore diff --git a/test/new_tests/version-filters-diamond/diamond/dub.sdl b/test/version-filters-diamond/diamond/dub.sdl similarity index 100% rename from test/new_tests/version-filters-diamond/diamond/dub.sdl rename to test/version-filters-diamond/diamond/dub.sdl diff --git a/test/new_tests/version-filters-diamond/diamond/source/dummy.d b/test/version-filters-diamond/diamond/source/dummy.d similarity index 100% rename from test/new_tests/version-filters-diamond/diamond/source/dummy.d rename to test/version-filters-diamond/diamond/source/dummy.d diff --git a/test/new_tests/version-filters-diamond/dub.sdl b/test/version-filters-diamond/dub.sdl similarity index 100% rename from test/new_tests/version-filters-diamond/dub.sdl rename to test/version-filters-diamond/dub.sdl diff --git a/test/new_tests/version-filters-diamond/son/dub.sdl b/test/version-filters-diamond/son/dub.sdl similarity index 100% rename from test/new_tests/version-filters-diamond/son/dub.sdl rename to test/version-filters-diamond/son/dub.sdl diff --git a/test/new_tests/version-filters-diamond/son/source/dummy.d b/test/version-filters-diamond/son/source/dummy.d similarity index 100% rename from test/new_tests/version-filters-diamond/son/source/dummy.d rename to test/version-filters-diamond/son/source/dummy.d diff --git a/test/new_tests/version-filters-diamond/source/app.d b/test/version-filters-diamond/source/app.d similarity index 100% rename from test/new_tests/version-filters-diamond/source/app.d rename to test/version-filters-diamond/source/app.d diff --git a/test/new_tests/version-filters-diamond/test.config b/test/version-filters-diamond/test.config similarity index 100% rename from test/new_tests/version-filters-diamond/test.config rename to test/version-filters-diamond/test.config diff --git a/test/new_tests/version-filters-none/dub.sdl b/test/version-filters-none/dub.sdl similarity index 100% rename from test/new_tests/version-filters-none/dub.sdl rename to test/version-filters-none/dub.sdl diff --git a/test/new_tests/version-filters-none/source/app.d b/test/version-filters-none/source/app.d similarity index 100% rename from test/new_tests/version-filters-none/source/app.d rename to test/version-filters-none/source/app.d diff --git a/test/new_tests/version-filters-none/test.config b/test/version-filters-none/test.config similarity index 100% rename from test/new_tests/version-filters-none/test.config rename to test/version-filters-none/test.config diff --git a/test/new_tests/version-filters-source-dep/.gitignore b/test/version-filters-source-dep/.gitignore similarity index 100% rename from test/new_tests/version-filters-source-dep/.gitignore rename to test/version-filters-source-dep/.gitignore diff --git a/test/new_tests/version-filters-source-dep/dub.sdl b/test/version-filters-source-dep/dub.sdl similarity index 100% rename from test/new_tests/version-filters-source-dep/dub.sdl rename to test/version-filters-source-dep/dub.sdl diff --git a/test/new_tests/version-filters-source-dep/source-dep/dub.sdl b/test/version-filters-source-dep/source-dep/dub.sdl similarity index 100% rename from test/new_tests/version-filters-source-dep/source-dep/dub.sdl rename to test/version-filters-source-dep/source-dep/dub.sdl diff --git a/test/new_tests/version-filters-source-dep/source-dep/source/dummy.d b/test/version-filters-source-dep/source-dep/source/dummy.d similarity index 100% rename from test/new_tests/version-filters-source-dep/source-dep/source/dummy.d rename to test/version-filters-source-dep/source-dep/source/dummy.d diff --git a/test/new_tests/version-filters-source-dep/source/app.d b/test/version-filters-source-dep/source/app.d similarity index 100% rename from test/new_tests/version-filters-source-dep/source/app.d rename to test/version-filters-source-dep/source/app.d diff --git a/test/new_tests/version-filters-source-dep/test.config b/test/version-filters-source-dep/test.config similarity index 100% rename from test/new_tests/version-filters-source-dep/test.config rename to test/version-filters-source-dep/test.config diff --git a/test/new_tests/version-filters/.gitignore b/test/version-filters/.gitignore similarity index 100% rename from test/new_tests/version-filters/.gitignore rename to test/version-filters/.gitignore diff --git a/test/new_tests/version-filters/daughter/dub.sdl b/test/version-filters/daughter/dub.sdl similarity index 100% rename from test/new_tests/version-filters/daughter/dub.sdl rename to test/version-filters/daughter/dub.sdl diff --git a/test/new_tests/version-filters/daughter/source/dummy.d b/test/version-filters/daughter/source/dummy.d similarity index 100% rename from test/new_tests/version-filters/daughter/source/dummy.d rename to test/version-filters/daughter/source/dummy.d diff --git a/test/new_tests/version-filters/dub.sdl b/test/version-filters/dub.sdl similarity index 100% rename from test/new_tests/version-filters/dub.sdl rename to test/version-filters/dub.sdl diff --git a/test/new_tests/version-filters/son/dub.sdl b/test/version-filters/son/dub.sdl similarity index 100% rename from test/new_tests/version-filters/son/dub.sdl rename to test/version-filters/son/dub.sdl diff --git a/test/new_tests/version-filters/son/source/dummy.d b/test/version-filters/son/source/dummy.d similarity index 100% rename from test/new_tests/version-filters/son/source/dummy.d rename to test/version-filters/son/source/dummy.d diff --git a/test/new_tests/version-filters/source/app.d b/test/version-filters/source/app.d similarity index 100% rename from test/new_tests/version-filters/source/app.d rename to test/version-filters/source/app.d diff --git a/test/new_tests/version-filters/test.config b/test/version-filters/test.config similarity index 100% rename from test/new_tests/version-filters/test.config rename to test/version-filters/test.config diff --git a/test/new_tests/version-spec/.gitignore b/test/version-spec/.gitignore similarity index 100% rename from test/new_tests/version-spec/.gitignore rename to test/version-spec/.gitignore diff --git a/test/new_tests/version-spec/dub.json b/test/version-spec/dub.json similarity index 100% rename from test/new_tests/version-spec/dub.json rename to test/version-spec/dub.json diff --git a/test/new_tests/version-spec/sample/newfoo/dub.sdl b/test/version-spec/sample/newfoo/dub.sdl similarity index 100% rename from test/new_tests/version-spec/sample/newfoo/dub.sdl rename to test/version-spec/sample/newfoo/dub.sdl diff --git a/test/new_tests/version-spec/sample/newfoo/source/app.d b/test/version-spec/sample/newfoo/source/app.d similarity index 100% rename from test/new_tests/version-spec/sample/newfoo/source/app.d rename to test/version-spec/sample/newfoo/source/app.d diff --git a/test/new_tests/version-spec/sample/oldfoo/dub.sdl b/test/version-spec/sample/oldfoo/dub.sdl similarity index 100% rename from test/new_tests/version-spec/sample/oldfoo/dub.sdl rename to test/version-spec/sample/oldfoo/dub.sdl diff --git a/test/new_tests/version-spec/sample/oldfoo/source/app.d b/test/version-spec/sample/oldfoo/source/app.d similarity index 100% rename from test/new_tests/version-spec/sample/oldfoo/source/app.d rename to test/version-spec/sample/oldfoo/source/app.d diff --git a/test/new_tests/version-spec/source/app.d b/test/version-spec/source/app.d similarity index 100% rename from test/new_tests/version-spec/source/app.d rename to test/version-spec/source/app.d diff --git a/test/new_tests/win32_default/.gitignore b/test/win32_default/.gitignore similarity index 100% rename from test/new_tests/win32_default/.gitignore rename to test/win32_default/.gitignore diff --git a/test/new_tests/win32_default/dub.json b/test/win32_default/dub.json similarity index 100% rename from test/new_tests/win32_default/dub.json rename to test/win32_default/dub.json diff --git a/test/new_tests/win32_default/sample.d b/test/win32_default/sample.d similarity index 100% rename from test/new_tests/win32_default/sample.d rename to test/win32_default/sample.d diff --git a/test/new_tests/win32_default/source/app.d b/test/win32_default/source/app.d similarity index 100% rename from test/new_tests/win32_default/source/app.d rename to test/win32_default/source/app.d diff --git a/test/new_tests/win32_default/test.config b/test/win32_default/test.config similarity index 100% rename from test/new_tests/win32_default/test.config rename to test/win32_default/test.config From 50b329acdad3de603a87c3064359ae923b96c026 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Fri, 22 Aug 2025 19:25:32 +0300 Subject: [PATCH 187/187] test/timeout: Increase timeout a little Signed-off-by: Andrei Horodniceanu --- test/timeout/source/app.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/timeout/source/app.d b/test/timeout/source/app.d index d286cbf77c..0f5e254ad8 100644 --- a/test/timeout/source/app.d +++ b/test/timeout/source/app.d @@ -25,7 +25,7 @@ void main () { auto p = spawnProcess(cmd); scope(exit) p.stop; - Thread.sleep(1.seconds); + Thread.sleep(4.seconds); if (!p.tryWait.terminated) die("Fetching from unconnectable registry should fail immediately."); if (p.wait == 0)