Be aware of DIFFABLE -> use a static timestamp for DAutoTest

This commit is contained in:
Sebastian Wilzbach 2018-01-09 05:58:40 +01:00
parent 559421c5f3
commit efd1bec0c8
2 changed files with 8 additions and 0 deletions

View file

@ -13,6 +13,9 @@ include ../src/osmodel.mak
BUILD=release
G_BIN=$(GENERATED)/$(OS)/$(BUILD)/$(MODEL)
# Removes inclusion of all dynamic content and timestamps
export DIFFABLE
################################################################################
# Main targets
################################################################################

View file

@ -79,9 +79,14 @@ string bold(string w)
void main()
{
import std.algorithm, std.array, std.conv, std.datetime, std.range, std.stdio, std.uni;
import std.process : environment;
import dmd.cli;
auto now = Clock.currTime;
auto diffable = environment.get("DIFFABLE", "0");
if (diffable == "1")
now = SysTime(DateTime(2018, 01, 01));
writefln(header, now.toISOExtString.take(10));
foreach (option; Usage.options)