1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-09-28 00:37:22 +00:00
os-autoinst-distri-fedora/perl2json
Adam Williamson dd247c7737 add bits for translating anaconda kickstart_tests to openQA
perl2json converts the openQA templates file to JSON (so we
can parse it with Python). kstest-converter does the meat of
the work of translating kickstart-tests to openQA tests: its
'kickstarts' subcommand produces .ks files from the .ks.in
files (you need to then make them available via HTTP somehow),
its 'templates' subcommand produces openQA 'test suites' and
'job templates' and merges them into an existing templates
file. Then you can load the templates file and fire off the
tests.
2016-04-02 17:27:11 -07:00

11 lines
203 B
Perl
Executable File

#!/bin/perl
use JSON;
my $infile = shift @ARGV;
my $outfile = shift @ARGV;
my $info = do $infile;
$info = JSON->new->relaxed->pretty->encode($info);
open(my $outfh, '>', $outfile);
print $outfh $info;