#!/usr/bin/python3
import os
import json

def build_manifest():
    tests = []
    with open("tests.txt", "r") as f:
        for command in f:
            command = "<<EXECUTABLE>> {}".format(command.strip())
            tests.append({'command': command})  
    
    # write to file
    with open("tests.pythia.json", "w") as f:
        json.dump(tests, f, indent=2, sort_keys=True)

    # destroy the original test file
    os.remove("tests.txt")

if __name__ == "__main__":
    build_manifest()
