-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[tests] Testing on Fedora: add notes and dep-install script
- Loading branch information
Showing
3 changed files
with
99 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Root .editorconfig for ronn-ng repo | ||
|
||
# EditorConfig is awesome: https://EditorConfig.org | ||
|
||
root = true | ||
|
||
# This projet is generally a 2-space-indent one. | ||
|
||
# TODO: Use explicit, limited list of extensions to avoid setting any controls | ||
# for test fixture files like .html, .ronn, and .roff? | ||
# [*.{rb,ru,sh,yml,md}] | ||
[*] | ||
end_of_line = lf | ||
indent_style = space | ||
indent_size = 2 | ||
tab_width = 4 | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
charset = utf-8 | ||
|
||
[Makefile] | ||
indent_style = tab | ||
indent_size = 4 | ||
|
||
# Test fixture text should remain exactly as is. | ||
[test/**] | ||
insert_final_newline = false | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/bin/bash | ||
# | ||
# install-fedora-deps - install Fedora dependencies for Ronn-NG | ||
# | ||
# This installs the RPM packages which Fedora uses as dependencies for Ronn-NG to supply | ||
# its gem dependencies. This is an alternative to installing them with bundler, and lets | ||
# you test Ronn-NG's source in this repo against the system gem packages it will use when | ||
# built in to an RPM. | ||
# | ||
# This does not install the ronn-ng package (rubygem-ronn) itself, to avoid contaminating | ||
# tests of the local Ronn-NG code in this repo with inconsistent versions loaded from the | ||
# system-installed gems. | ||
|
||
pkg_deps=(ruby rubygems-devel rubygem-test-unit | ||
rubygem-kramdown rubygem-kramdown-parser-gfm | ||
rubygem-mustache rubygem-nokogiri) | ||
pkg_anti_deps=(rubygem-ronn-ng rubygem-ronn) | ||
|
||
echo "Installing dep dnf pkgs: ${pkg_deps[@]}" | ||
echo | ||
sudo dnf install -y "${pkg_deps[@]}" | ||
|
||
# Check that the anti-dependencies (main or conflicting code) are not installed | ||
antis_shown=0 | ||
for pkg in "${pkg_anti_deps[@]}"; do | ||
if dnf list installed | cut -d ' ' -f 1 | grep -x "${pkg}.noarch" &> /dev/null; then | ||
if [[ $antis_shown == 0 ]]; then | ||
antis_shown=1 | ||
echo | ||
fi | ||
echo "WARNING: anti-dep pkg ${pkg} is installed, and may interfere with testing" | ||
fi | ||
done | ||
if [[ $antis_shown == 1 ]]; then | ||
echo | ||
fi | ||
|
||
echo "Done." | ||
echo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters