Add swift support to test

Add logic so that our test script can also be used
to test swift.