elab_in_elab.t 1 KB
Newer Older
Kevin Tew's avatar
Kevin Tew committed
1
#!/usr/bin/perl
Mike Hibler's avatar
Mike Hibler committed
2 3 4 5 6
#
# EMULAB-COPYRIGHT
# Copyright (c) 2009 University of Utah and the Flux Group.
# All rights reserved.
#
Kevin Tew's avatar
Kevin Tew committed
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
use SemiModern::Perl;
use TBConfig;
use TestBed::TestSuite;
use TestBed::TestSuite::Experiment;
use Test::More tests => 2;
use Data::Dumper;

my $ns = <<'NSEND';
source tb_compat.tcl
set ns [new Simulator]

tb-elab-in-elab 1
tb-elabinelab-singlenet

namespace eval TBCOMPAT {
    set elabinelab_maxpcs 3
    set elabinelab_hardware("boss") pc3000
    set elabinelab_hardware("ops") pc3000
    set elabinelab_nodeos("boss") FBSD62-STD
    set elabinelab_nodeos("ops") FBSD62-STD
}

$ns run 
NSEND

my $eid='eine';
my $e = e($eid);

#ok($e->startrun($ns, \&run_inside_exper), 'e-in-e started');

sub run_inside_exper {
  my $boss_name = $e->node('myboss.eine.tbres.emulab.net')->name;
  my $boss_url = "https://$boss_name:3069/usr/testbed";
  say $boss_url;
41 42 43
  my $cmd = "./tbts -d -x '$boss_url' t/xmlrpc/experiment.t";
  say $cmd;
  ok(!system($cmd), 'eine single node experiment');
Kevin Tew's avatar
Kevin Tew committed
44 45
}
run_inside_exper;