Import('env')
env = env.Clone()
env.AppendUnique(
    CC=['-fsampler-scheme=scalar-pairs'],
    CCFLAGS=[
        '-Wno-maybe-uninitialized',
        '-Wno-strict-overflow',
        ],
    )
uenv = env.Clone(TEST_ARGS=['once', 'upon', 'a', 'time'])

late_global = env.CBIProgram('late-global.c')
late_global = env.CBIResolvedSamples(env.CBIReports(late_global), objects=late_global)

upcase_good = uenv.CBIProgram('upcase-good.c')
upcase_good = uenv.CBIResolvedSamples(uenv.CBIReports(upcase_good, TEST_STDOUT='/dev/null'), objects=upcase_good)

upcase_bad = uenv.CBIProgram('upcase-bad.c')
upcase_bad = uenv.CBIResolvedSamples(uenv.CBIReports(upcase_bad, TEST_STDERR='/dev/null', TEST_PREFIX='!'), objects=upcase_bad)

Alias('test:scalar-pairs', map(env.Expect, [late_global, upcase_good, upcase_bad]))
Alias('test', 'test:scalar-pairs')

File(Glob('*.expected'))
