Merge pull request #2880 from jon-turney/gir-cygwin

Fix and run gobject-introspection tests on cygwin
pull/2892/head
Jussi Pakkanen 7 years ago committed by GitHub
commit 8ac6ab3756
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      ci/appveyor-install.bat
  2. 1
      run_project_tests.py
  3. 3
      test cases/frameworks/11 gir subproject/gir/meson.build
  4. 4
      test cases/frameworks/11 gir subproject/installed_files.txt
  5. 4
      test cases/frameworks/12 multiple gir/installed_files.txt
  6. 3
      test cases/frameworks/7 gnome/gir/meson.build
  7. 6
      test cases/frameworks/7 gnome/installed_files.txt
  8. 4
      test cases/vala/11 generated vapi/installed_files.txt
  9. 23
      test cases/vala/11 generated vapi/libbar/bar.c
  10. 6
      test cases/vala/11 generated vapi/libbar/bar.h
  11. 21
      test cases/vala/11 generated vapi/libfoo/foo.c
  12. 6
      test cases/vala/11 generated vapi/libfoo/foo.h
  13. 4
      test cases/vala/11 generated vapi/main.vala
  14. 4
      test cases/vala/7 shared library/installed_files.txt
  15. 2
      test cases/vala/9 gir/installed_files.txt

@ -10,10 +10,13 @@ echo Updating Cygwin and installing ninja and test prerequisites
%CYGWIN_ROOT%\%SETUP% -qnNdO -R "%CYGWIN_ROOT%" -s "%CYGWIN_MIRROR%" -l "%CACHE%" -g -P ^
gcc-objc++,^
gcc-objc,^
gobject-introspection,^
libboost-devel,^
libglib2.0-devel,^
libgtk3-devel,^
ninja,^
python3-pip,^
vala,^
zlib-devel
echo Install done

@ -185,6 +185,7 @@ def get_relative_files_list_from_dir(fromdir):
def platform_fix_name(fname, compiler):
if '?lib' in fname:
if mesonlib.is_cygwin():
fname = re.sub(r'lib/\?lib(.*)\.so$', r'bin/cyg\1.dll', fname)
fname = re.sub(r'\?lib(.*)\.dll$', r'cyg\1.dll', fname)
else:
fname = re.sub(r'\?lib', 'lib', fname)

@ -31,6 +31,9 @@ message('TEST: ' + girsubproject.outdir())
envdata = environment()
envdata.append('GI_TYPELIB_PATH', girsubproject.outdir(), 'subprojects/mesongir', separator : ':')
envdata.append('LD_LIBRARY_PATH', girsubproject.outdir(), 'subprojects/mesongir')
if ['windows', 'cygwin'].contains(host_machine.system())
envdata.append('PATH', girsubproject.outdir(), 'subprojects/mesongir')
endif
test('gobject introspection/subproject/c', girexe)
test('gobject introspection/subproject/py', find_program('prog.py'),

@ -2,5 +2,5 @@ usr/lib/girepository-1.0/Meson-1.0.typelib
usr/lib/girepository-1.0/MesonSub-1.0.typelib
usr/share/gir-1.0/Meson-1.0.gir
usr/share/gir-1.0/MesonSub-1.0.gir
usr/lib/libgirsubproject.so
usr/lib/libgirlib.so
usr/lib/?libgirsubproject.so
usr/lib/?libgirlib.so

@ -1,6 +1,6 @@
usr/lib/girepository-1.0/Meson-1.0.typelib
usr/lib/girepository-1.0/MesonSub-1.0.typelib
usr/lib/libgirlib.so
usr/lib/libgirsubproject.so
usr/lib/?libgirlib.so
usr/lib/?libgirsubproject.so
usr/share/gir-1.0/Meson-1.0.gir
usr/share/gir-1.0/MesonSub-1.0.gir

@ -41,5 +41,8 @@ gir_paths = ':'.join([girlib.outdir(), dep1lib.outdir(), dep2lib.outdir()])
envdata = environment()
envdata.append('GI_TYPELIB_PATH', gir_paths, separator : ':')
envdata.append('LD_LIBRARY_PATH', gir_paths)
if ['windows', 'cygwin'].contains(host_machine.system())
envdata.append('PATH', gir_paths)
endif
test('gobject introspection/py', find_program('prog.py'),
env : envdata)

@ -2,9 +2,9 @@ usr/include/enums.h
usr/include/enums2.h
usr/include/enums3.h
usr/include/marshaller.h
usr/lib/libgir_lib.so
usr/lib/libdep1lib.so
usr/lib/libdep2lib.so
usr/lib/?libgir_lib.so
usr/lib/?libdep1lib.so
usr/lib/?libdep2lib.so
usr/lib/girepository-1.0/Meson-1.0.typelib
usr/lib/girepository-1.0/MesonDep1-1.0.typelib
usr/lib/girepository-1.0/MesonDep2-1.0.typelib

@ -1,6 +1,6 @@
usr/bin/vapigen-test
usr/lib/libfoo.so
usr/lib/libbar.so
usr/lib/?libfoo.so
usr/lib/?libbar.so
usr/share/vala/vapi/foo-1.0.vapi
usr/share/vala/vapi/foo-1.0.deps
usr/share/vala/vapi/bar-1.0.vapi

@ -1,12 +1,29 @@
#include "bar.h"
#include "foo.h"
struct _BarBar
{
GObject parent_instance;
};
G_DEFINE_TYPE (BarBar, bar_bar, G_TYPE_OBJECT)
static void
bar_bar_class_init (BarBarClass *klass)
{
}
static void
bar_bar_init (BarBar *self)
{
}
/**
* bar_return_success:
* bar_bar_return_success:
*
* Returns 0
*/
int bar_return_success(void)
int bar_bar_return_success(void)
{
return foo_return_success();
return foo_foo_return_success();
}

@ -2,4 +2,8 @@
#pragma once
int bar_return_success(void);
#define BAR_TYPE_BAR (bar_bar_get_type())
G_DECLARE_FINAL_TYPE (BarBar, bar_bar, BAR, BAR, GObject)
int bar_bar_return_success(void);

@ -1,11 +1,28 @@
#include "foo.h"
struct _FooFoo
{
GObject parent_instance;
};
G_DEFINE_TYPE (FooFoo, foo_foo, G_TYPE_OBJECT)
static void
foo_foo_class_init (FooFooClass *klass)
{
}
static void
foo_foo_init (FooFoo *self)
{
}
/**
* foo_return_success:
* foo_foo_return_success:
*
* Returns 0
*/
int foo_return_success(void)
int foo_foo_return_success(void)
{
return 0;
}

@ -2,4 +2,8 @@
#pragma once
int foo_return_success(void);
#define FOO_TYPE_FOO (foo_foo_get_type())
G_DECLARE_FINAL_TYPE (FooFoo, foo_foo, Foo, FOO, GObject)
int foo_foo_return_success(void);

@ -3,7 +3,7 @@ using Bar;
class Main : GLib.Object {
public static int main(string[] args) {
var ignore = Foo.return_success();
return Bar.return_success();
var ignore = Foo.Foo.return_success();
return Bar.Bar.return_success();
}
}

@ -1,5 +1,5 @@
usr/lib/libinstalled_vala_lib.so
usr/lib/libinstalled_vala_all.so
usr/lib/?libinstalled_vala_lib.so
usr/lib/?libinstalled_vala_all.so
usr/include/installed_vala_all.h
usr/include/valah/installed_vala_all_nolib.h
usr/include/installed_vala_onlyh.h

@ -1,2 +1,2 @@
usr/lib/libfoo.so
usr/lib/?libfoo.so
usr/share/gir-1.0/Foo-1.0.gir

Loading…
Cancel
Save