Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
eepm
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
eepm
Commits
bb9bd229
Commit
bb9bd229
authored
Dec 28, 2022
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests: add os-release tests
parent
ac5bafc1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
50 additions
and
4 deletions
+50
-4
os-release
tests/etc/Fedora/etc/os-release
+22
-0
etalon.txt
tests/etc/MOS/etalon.txt
+1
-0
os-release
tests/etc/MOS/etc/os-release
+9
-0
os-release
tests/etc/Ubuntu/etc/os-release
+12
-0
test_distr_info.sh
tests/test_distr_info.sh
+6
-4
No files found.
tests/etc/Fedora/etc/os-release
0 → 100644
View file @
bb9bd229
NAME="Fedora Linux"
VERSION="37 (Workstation Edition)"
ID=fedora
VERSION_ID=37
VERSION_CODENAME=""
PLATFORM_ID="platform:f37"
PRETTY_NAME="Fedora Linux 37 (Workstation Edition)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:37"
DEFAULT_HOSTNAME="fedora"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f37/system-administrators-guide/"
SUPPORT_URL="https://ask.fedoraproject.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=37
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=37
SUPPORT_END=2023-11-14
VARIANT="Workstation Edition"
VARIANT_ID=workstation
tests/etc/MOS/etalon.txt
0 → 100644
View file @
bb9bd229
MOC/10
tests/etc/MOS/etc/os-release
0 → 100644
View file @
bb9bd229
NAME="M OC"
VERSION="MOS p10"
ID=mos
ID_LIKE=altlinux
VERSION_ID=10
PRETTY_NAME="MOS 830"
ANSI_COLOR="1;33"
CPE_NAME="cpe:/o:alt:mos:p10"
LOGO=mos
tests/etc/Ubuntu/etc/os-release
0 → 100644
View file @
bb9bd229
NAME="Ubuntu"
VERSION="20.04.4 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.4 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
tests/test_distr_info.sh
View file @
bb9bd229
...
...
@@ -6,15 +6,17 @@ WRITE=''
for
ROOTDIR
in
$(
ls
-1d
etc/
*)
;
do
export
ROOTDIR
e
=
$(
../bin/distr_info
-e
)
s
=
$(
../bin/distr_info
-s
)
idstr
=
"
$e
$s
"
if
[
-n
"
$WRITE
"
]
;
then
echo
"
$
e
"
>
$ROOTDIR
/etalon.txt
echo
"
$
idstr
"
>
$ROOTDIR
/etalon.txt
continue
fi
le
=
"
$(
cat
$ROOTDIR
/etalon.txt 2>/dev/null
)
"
if
[
"
$le
"
=
"
$
e
"
]
;
then
printf
"%23s -> %20s : %s
\n
"
"
$(
basename
$ROOTDIR
)
"
"
$
e
"
"OK"
if
[
"
$le
"
=
"
$
idstr
"
]
;
then
printf
"%23s -> %20s : %s
\n
"
"
$(
basename
$ROOTDIR
)
"
"
$
idstr
"
"OK"
else
printf
"%23s -> %20s : %s
\n
"
"
$(
basename
$ROOTDIR
)
"
"
$
e
"
"FAIL (expect
$le
)"
printf
"%23s -> %20s : %s
\n
"
"
$(
basename
$ROOTDIR
)
"
"
$
idstr
"
"FAIL (expect
$le
)"
fi
done
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment