Пример #1
0
def submit_experiment_a8(api, duration, nb_nodes,
                         site="grenoble",
                         name="test_exp_A8"):
    resources = exp_resources_from_str(
                 "{},archi=a8:at86rf231+site={}".format(nb_nodes, site))
    exp = experiment.submit_experiment(api, name, duration, [resources])
    exp_id = exp['id']
    return exp_id
Пример #2
0
def test_submit_experiment_a8_physical(api):
    resources = exp_resources_from_str("grenoble,a8,1-2")
    name = "test_exp_A8"
    duration = 2
    exp = experiment.submit_experiment(api, name, duration, [resources])
    exp_id = exp['id']
    experiment.wait_experiment(api, exp_id)
    state = experiment.get_experiment(api, exp_id, 'state')
    assert state['state'] == "Running"
Пример #3
0
def test_submit_experiment_a8_logical(api, exp):
    name = "test_exp_A8"
    duration = 2
    resources = exp_resources_from_str("2,archi=a8:at86rf231+site=grenoble")
    ret = experiment.submit_experiment(api, name, duration, [resources])
    exp.id = ret['id']
    exp_id = exp.id
    experiment.wait_experiment(api, exp_id)
    state = experiment.get_experiment(api, exp_id, 'state')
    assert state['state'] == "Running"
Пример #4
0
def test_exp_resources_from_str_on_dev():
    from iotlabcli.parser.experiment import exp_resources_from_str
    exp_resources_from_str("2,archi=a8:at86rf231+site=grenoble")
Пример #5
0
def test_exp_resources_from_str_on_prod_fails():
    with pytest.raises(Exception):
        exp_resources_from_str("2,archi=a8:at86rf231+site=grenoble")
Пример #6
0
def test_exp_resources_from_str_on_dev():
    exp_resources_from_str("2,archi=a8:at86rf231+site=devgrenoble")
Пример #7
0
def test_exp_resources_from_str_on_prod_fails():
    try:
        exp_resources_from_str("2,archi=a8:at86rf231+site=grenoble")
        assert False  # will raise if running on the dev platform
    except:
        pass