]> git.proxmox.com Git - pve-ha-manager.git/blame - src/pve-ha-tester
pve-ha-tester: use correct lib path
[pve-ha-manager.git] / src / pve-ha-tester
CommitLineData
88c1865e
DM
1#!/usr/bin/perl
2
3use strict;
4use warnings;
5use JSON;
f503a7bf
FG
6
7use lib '.';
88c1865e
DM
8
9use PVE::Tools;
9e5ea8f7 10use PVE::HA::Config;
f7cb19c6 11
88c1865e
DM
12use PVE::HA::Sim::TestHardware;
13
14sub show_usage {
15 print "usage: $0 <testdir>\n";
16 exit(-1);
17};
18
88c1865e
DM
19my $testdir = shift || show_usage();
20my $hardware = PVE::HA::Sim::TestHardware->new($testdir);
21
22$hardware->log('info', "starting simulation");
23
24eval { $hardware->run(); };
25if (my $err = $@) {
26 $hardware->log('err', "exit simulation - $err ");
27} else {
28 $hardware->log('info', "exit simulation - done");
29}
30
31exit(0);
32
33
34