import os

Import("env")

if env["TEST"] :
	myenv = env.Clone()
	myenv.UseFlags(myenv["SWIFTEN_FLAGS"])
	myenv.UseFlags(myenv["SWIFTEN_DEP_FLAGS"])

	for i in ["SWIFT_CLIENTTEST_JID", "SWIFT_CLIENTTEST_PASS"]:
		if ARGUMENTS.get(i.lower(), False) :
			myenv["ENV"][i] = ARGUMENTS[i.lower()]
		elif os.environ.get(i, "") :
			myenv["ENV"][i] = os.environ[i]

	tester = myenv.Program("ClientTest", ["ClientTest.cpp"])
	myenv.Test(tester, "system")
