Compare commits
No commits in common. "c8" and "c8s" have entirely different histories.
3
.gitignore
vendored
3
.gitignore
vendored
@ -1 +1,2 @@
|
|||||||
SOURCES/libgit2-glib-0.26.4.tar.xz
|
/libgit2-glib-0.26.0.tar.xz
|
||||||
|
/libgit2-glib-0.26.4.tar.xz
|
||||||
|
@ -1 +0,0 @@
|
|||||||
aa71685615af8187c1dabcbfd403532519f87141 SOURCES/libgit2-glib-0.26.4.tar.xz
|
|
6
gating.yaml
Normal file
6
gating.yaml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
--- !Policy
|
||||||
|
product_versions:
|
||||||
|
- rhel-8
|
||||||
|
decision_context: osci_compose_gate
|
||||||
|
rules:
|
||||||
|
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
|
1
sources
Normal file
1
sources
Normal file
@ -0,0 +1 @@
|
|||||||
|
SHA512 (libgit2-glib-0.26.4.tar.xz) = 9eb78f292583862890ca0cd27d7621da2f8f633a76f4679f897ce6cf9e06b64a3cb7b0ddda39d231d21d3faa830fe1a9a9326b4abd420df8356d50a734360b37
|
33
tests/scripts/run_tests
Executable file
33
tests/scripts/run_tests
Executable file
@ -0,0 +1,33 @@
|
|||||||
|
#!/usr/bin/python3
|
||||||
|
""" Make sure that libgit2-glib works correctly
|
||||||
|
"""
|
||||||
|
import gi
|
||||||
|
gi.require_version("Ggit", "1.0")
|
||||||
|
from gi.repository import Ggit as Git
|
||||||
|
from gi.repository import Gio
|
||||||
|
|
||||||
|
import os
|
||||||
|
import tempfile
|
||||||
|
|
||||||
|
def test_libgit2(git_path):
|
||||||
|
"""Test libgit2"""
|
||||||
|
Git.init()
|
||||||
|
repo = Git.Repository.init_repository(Gio.file_new_for_path(git_path), True)
|
||||||
|
|
||||||
|
# Make an initial empty commit
|
||||||
|
sig = Git.Signature.new_now("bdcs-api-server", "user-email")
|
||||||
|
tree_id = repo.get_index().write_tree()
|
||||||
|
tree = repo.lookup(tree_id, Git.Tree)
|
||||||
|
repo.create_commit("HEAD", sig, sig, "UTF-8", "Initial commit", tree, [])
|
||||||
|
|
||||||
|
commit_id = repo.revparse("master").get_id()
|
||||||
|
commit = repo.lookup(commit_id, Git.Commit)
|
||||||
|
message = commit.get_message()
|
||||||
|
|
||||||
|
if message != "Initial commit":
|
||||||
|
print("ERROR: Problem with Initial commit: %s" % message)
|
||||||
|
os.exit(1)
|
||||||
|
|
||||||
|
if __name__=='__main__':
|
||||||
|
with tempfile.TemporaryDirectory(prefix="test.libgit2.") as git_repo:
|
||||||
|
test_libgit2(git_repo)
|
15
tests/tests.yml
Normal file
15
tests/tests.yml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
# Run a simple test
|
||||||
|
- hosts: localhost
|
||||||
|
roles:
|
||||||
|
- role: standard-test-basic
|
||||||
|
tags:
|
||||||
|
- classic
|
||||||
|
|
||||||
|
required_packages:
|
||||||
|
- python36
|
||||||
|
|
||||||
|
tests:
|
||||||
|
- simple:
|
||||||
|
dir: scripts
|
||||||
|
run: ./run_tests
|
Loading…
Reference in New Issue
Block a user