mirror of
https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git
synced 2024-11-21 21:43:08 +00:00
Add perl syntax check test, add it to CI
Inspired by openQA's 01-compile-check-all.t, this adds a perl test which checks the syntax of main.pm and all lib and test files, and hooks it up to CI. Requires os-autoinst and perl-Test-Strict. Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
parent
80ddb89f91
commit
1eb4e3dca5
@ -3,7 +3,13 @@
|
|||||||
run: ci/tox.yaml
|
run: ci/tox.yaml
|
||||||
nodeset: fedora-31-vm
|
nodeset: fedora-31-vm
|
||||||
|
|
||||||
|
- job:
|
||||||
|
name: os-autoinst-perl
|
||||||
|
run: ci/perl.yaml
|
||||||
|
nodeset: fedora-31-vm
|
||||||
|
|
||||||
- project:
|
- project:
|
||||||
check:
|
check:
|
||||||
jobs:
|
jobs:
|
||||||
- os-autoinst-tox
|
- os-autoinst-tox
|
||||||
|
- os-autoinst-perl
|
||||||
|
11
ci/perl.yaml
Normal file
11
ci/perl.yaml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
- hosts: all
|
||||||
|
tasks:
|
||||||
|
- name: Install required packages
|
||||||
|
package:
|
||||||
|
name: ['os-autoinst', 'perl-Test-Strict', 'perl-Test-Harness']
|
||||||
|
state: present
|
||||||
|
become: yes
|
||||||
|
- name: Run perl tests
|
||||||
|
command: prove t/
|
||||||
|
args:
|
||||||
|
chdir: '{{ zuul.project.src_dir }}'
|
@ -1,4 +1,7 @@
|
|||||||
package anacondatest;
|
package anacondatest;
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
|
||||||
use base 'basetest';
|
use base 'basetest';
|
||||||
|
|
||||||
# base class for all Anaconda (installation) tests
|
# base class for all Anaconda (installation) tests
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
package fedoradistribution;
|
package fedoradistribution;
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
|
||||||
use base 'distribution';
|
use base 'distribution';
|
||||||
use Cwd;
|
use Cwd;
|
||||||
|
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
package installedtest;
|
package installedtest;
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
|
||||||
use base 'basetest';
|
use base 'basetest';
|
||||||
|
|
||||||
# base class for tests that run on installed system
|
# base class for tests that run on installed system
|
||||||
|
7
t/01-syntax.t
Normal file
7
t/01-syntax.t
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/perl
|
||||||
|
|
||||||
|
use FindBin;
|
||||||
|
unshift @INC, "/usr/libexec/os-autoinst", "$FindBin::Bin/../lib", "$FindBin::Bin/lib";
|
||||||
|
|
||||||
|
use Test::Strict;
|
||||||
|
all_perl_files_ok(qw 'main.pm lib tests');
|
Loading…
Reference in New Issue
Block a user