| # Assume python 2.6 or 2.7 |
| # -- config ----------------------- |
| # Absolute path pointing to your cloned git repo of https://github.com/KhronosGroup/glTF/sampleModels |
| base_model_dir = "/Users/syoyo/work/glTF/sampleModels" |
| kinds = [ "glTF", "glTF-Binary", "glTF-Embedded", "glTF-MaterialsCommon"] |
| # --------------------------------- |
| print("Testing: " + filename) |
| cmd = ["./loader_test", filename] |
| p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) |
| (stdout, stderr) = p.communicate() |
| print "Failed to execute: ", cmd |
| for d in os.listdir(base_model_dir): |
| p = os.path.join(base_model_dir, d) |
| targetDir = os.path.join(p, k) |
| g = glob.glob(targetDir + "/*.gltf") |
| print("Success : {0}".format(len(success))) |
| print("Failed : {0}".format(len(failed))) |
| if __name__ == '__main__': |