#!/usr/bin/env python3
#
# Determine the duration of a specified test.
#
#
# TODO: This is a bare-bones, unreliable implementation that should be
# used only for testing.
#

import datetime
import sys

import pscheduler

json = pscheduler.json_load(exit_on_error=True)['spec']

# TODO: Make sure the type is one we like
# TODO: Validate the spec


try:
    pscheduler.succeed_json({
            "duration": json["duration"]
            })
except KeyError:
    pscheduler.fail("Missing duration in spec")
