summaryrefslogtreecommitdiff
path: root/tests/offsets
Commit message (Collapse)AuthorAgeFilesLines
* Make test suite work with cross-related optionsJohn Ericson2021-05-231-3/+2
| | | | | | | | | | Because of skepticism I received in #224, I made this PR which keeps the testsuite and CI improvements but doesn't add any new build options. I hope this would be less controversial: - no new knobs - tests for those using existing build options - CI tests `build_introspection_data = false`
* Meson: Fix build when gobject-introspection is a subprojectXavier Claessens2021-03-251-6/+6
| | | | | meson.source_root() return the root of the main project, but in this case we want the root of the gobject-introspection (sub)project.
* Visual Studio builds: Use -utf-8 where availableChun-wei Fan2020-01-151-0/+1
| | | | | | | | | | | | This avoids compilation erroring out on C4819 (Unicode handling issue in the Visual Studio compiler), notably when running on Chinese, Japanese and Korean (CJK) locales. This also applies -utf-8 into the cflags passed into the various g-ir-scanner command lines that are used to generate the *.gir files, where -utf-8 is available, so that we don't get flooded with C4819 warnings during the build, and therefore avoid potential mishaps, as C4819 is a real warning that warngs us the code may be incorrectly built.
* meson: always pass --qiet to g-ir-scannerChristoph Reiter2019-04-071-0/+1
| | | | Less noisy build
* Drop autotools build systemChristoph Reiter2019-03-111-56/+0
|
* scanner: Flatten multi-dimensional arrays fieldsTomasz Miąsko2019-01-072-0/+26
| | | | | | | | | | | | | Provide partial support for multi-dimensional arrays by representing them as flattened one dimensional array with size that is equal to product of sizes in each dimension. Previously only the first dimension would be actually used. This should be sufficient to ensure that those fields have layout compatible with C, without using nested array types that are currently unsupported by vapigen Issue #255.
* scanner: Merge basic types in `specifier_qualifier_list` production.Tomasz Miąsko2019-01-052-0/+10
| | | | | | | | | | | This is necessary to parse types like `unsigned char` or `long double`, and is already done when parsing `declarations_specifiers`. Examples that are fixed by this change include: * `GLib.TestLogMsg.nums` previously parsed as `long` but should be `long double`. * `GMime.Encoding.uubuf` previously parsed as `unsigned` but should be `unsigned char`.
* meson: make test_offsets.py work on WindowsChristoph Reiter2019-01-011-6/+7
| | | | | meson doesn't set PATH for the test dependencies so we have to do it manually. Also make sure the test depends on the test binary.
* gitestoffsets: use g_fprintf and fix the format specifier for the struct offsetChristoph Reiter2019-01-011-19/+20
| | | | | | | G_GSIZE_FORMAT should only be used with glib functions and G_STRUCT_OFFSET() returns glong not gsize. This fixes various compiler warnings on Windows.
* tests: Use macros to print field offsetsTomasz Miąsko2018-12-291-60/+63
|
* tests: Drop separate functions for offsets testsTomasz Miąsko2018-12-291-56/+11
|
* tests: Use macro to determine alignmentTomasz Miąsko2018-12-291-49/+9
|
* tests: Introspect list of fields in offsets testTomasz Miąsko2018-12-191-185/+31
|
* tests: Drop autogeneration of offsets testsTomasz Miąsko2018-12-194-264/+430
| | | | | | | | Generating offsets test makes them quite hard to understand. The fact that they parse C code with custom regular expressions don't help either. Replace offsets test with their generated form.
* autotools: dist newly added meson build filesChristoph Reiter2018-12-161-1/+2
|
* girepository: Add version macros and functions. Fixes #200Christoph Reiter2018-12-161-1/+1
| | | | | | | | | | | This adds the following macros and functions: GI_MAJOR_VERSION, GI_MICRO_VERSION, GI_MINOR_VERSION, GI_CHECK_VERSION, gi_get_major_version,gi_get_micro_version, gi_get_minor_version. Since we share a prefix with glib we have to namespace these by using the gi_ prefix. g_gi would also work but we already export symbols with gi_ like gi_cclosure_marshal_generic(), gi_type_tag_get_ffi_type() and gi_type_info_extract_ffi_return_value(), so let's not add another naming scheme.
* meson: Port offsets testsTomasz Miąsko2018-12-101-0/+79
|
* Drop all Python 2 compat codeChristoph Reiter2018-12-081-2/+0
| | | | We only support 3.4+ now.
* autotools: start using AX_COMPILER_FLAGS, enable -Werror on CIChristoph Reiter2018-07-291-1/+4
| | | | | | | | | * This adds a new dependency on autoconf-archive. * Pass WARN_CFLAGS/WARN_LDFLAGS/WARN_SCANNERFLAGS to everything we control the source of * Disables all warning flags which make the build error out for now, we'll re-enable them in followup commits. * AX_COMPILER_FLAGS is used with the release flag always on so we don't get -Werror by default.
* tests: add .exe extension when calling the offset test binaryChristoph Reiter2018-07-271-1/+2
| | | | autotools is picky on Windows and errors out otherwise
* tests: port offset tests to PythonChristoph Reiter2018-07-262-5/+52
| | | | | | | Use the test executable to generate files in a temporary location and use difflib to compare their content. This removes the requirement on "diff" for the test.
* removing $(srcdir) because it is not replaced correctly and not necessaryKarl-Philipp Richter2018-02-081-1/+1
| | | | See #120.
* Revert "removing $(srcdir) because it is not replaced correctly and not ↵Emmanuele Bassi2017-05-041-2/+2
| | | | | | | | necessary" This reverts commit 17ef691e9b3ebd475b01d1e623d3df7b1f534dfa. This breaks builddir != srcdir builds, like GNOME Continuous.
* Revert "build: Use $(srcdir) when calling Python scripts"Emmanuele Bassi2017-05-041-1/+1
| | | | This reverts commit b1200a87bc0bd4f4fcd5275f25422032104138ed.
* build: Use $(srcdir) when calling Python scriptsEmmanuele Bassi2017-05-041-1/+1
| | | | | | We need to point Python in the right direction, because unlike source rules, automake won't automatically expand commands in explicit make rules.
* removing $(srcdir) because it is not replaced correctly and not necessaryKarl-Philipp Richter2017-05-041-2/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=744021
* tests: drop an assumption that time_t is same as glongAdam Borowski2016-02-141-2/+0
| | | | | | | | | | | This is false on x32, arm32 on Linux and on 32-bit archs of FreeBSD, OpenBSD. In general we've been moving g-i away from supporting time_t due to various problems - GLib-using apps should use GTimeVal or GDateTime etc. https://bugzilla.gnome.org/show_bug.cgi?id=736109
* giscanner: Use print as a function for Python 3 compatibilitySimon Feltman2015-09-291-2/+4
| | | | | | | Use future import "print_function" and update relevant uses of print as a function call. See: PEP 3105 https://bugzilla.gnome.org/show_bug.cgi?id=679438
* tests: fix commentDieter Verfaillie2015-06-291-1/+1
| | | | | Code uses LOG_COMPILER, comment mistakenly still mentioned TESTS_ENVIRONMENT.
* tests: make sure g-ir-scanner can find cairo-1.0.girDieter Verfaillie2015-06-241-1/+1
| | | | | | | | | | "cairo-1.0.gir" is generated into "$(top_builddir)/gir" but g-ir-scanner is never instructed to look into that directory. This fails somewhat when there is no system installed copy of it when VPATH building "tests/scanner/Regress-1.0.gir": Couldn't find include cairo-1.0.gir (search path: "everything except the correct value") https://bugzilla.gnome.org/show_bug.cgi?id=745636
* tests: Export the Symbols from the Offsets TestsChun-wei Fan2014-09-033-3/+8
| | | | | | | | Like the other test programs, include config.h before anything and decorate the lone symbols for export, and include $(top_srcdir)/tests so that gitestmacros.h can be found and used. https://bugzilla.gnome.org/show_bug.cgi?id=732669
* build: Export Symbols Using Compiler DirectivesChun-wei Fan2014-08-151-1/+1
| | | | | | | | | | | Use compiler directives for exporting symbols for the build of libgirepository and also for the test libraries, like what is now done in GLib and GTK+ so that maintaining a separate .symbols (and .def files) would not be needed, in which the correct compiler directive is determined during configure time. Drop all the .def files and the .symbols file as we would not be using them anymore. https://bugzilla.gnome.org/show_bug.cgi?id=732669
* tests: Switch two more uses to LOG_COMPILER to fix parallel-testsColin Walters2014-01-251-2/+1
| | | | | | This is similar to previous commits; we need to use LOG_COMPILER in order for Automake's parallel-tests framework to work. It's not allowed to include binaries in TESTS_ENVIRONMENT anymore.
* tests: Use Automake test harness for tests/offsetsSimon Feltman2014-01-021-10/+13
| | | | | | | | Replace usage of check-local with the Automake test harness. Change check_ variable usage to EXTRA_ in order to avoid building these dependencies with targeted testing using TESTS= in parent directories. https://bugzilla.gnome.org/show_bug.cgi?id=720713
* giscanner: store code before and after comment blockDieter Verfaillie2013-10-081-2/+1
| | | | | | so we can later use them to re-write source files containing broken GTK-Doc comment blocks where /** is preceded by and/or */ is followed by code...
* tests/offsets: Remove leftover g_type_init() callColin Walters2012-10-311-2/+0
|
* Fix tests to look in correct directory for typelibsColin Walters2010-11-161-1/+1
| | | | With nonrecursive they're in $(top_builddir) now
* Switch to nonrecursive make for core (i.e. not tests/)Colin Walters2010-11-091-1/+1
| | | | | This is cleaner and faster, and prepares us better for an incoming import of CMPH.
* [test] Fix a leftover renameJohan Dahlin2010-09-131-1/+1
| | | | The gir name got renamed, update the rules to reflect that
* tests: Fix namespacing for BarApp (should be just Bar)Colin Walters2010-08-313-27/+28
|
* Use AM_V_GEN more a more quiet buildJohan Dahlin2009-12-311-1/+1
| | | | Also suppress a bit more using @
* Add a Makefile.introspectionJohan Dahlin2009-12-141-13/+8
| | | | | This will make it easier for third-party projects to use introspection by having easy make rules.
* Remove a remnant of shaveJohan Bilien2009-09-181-1/+1
|
* LD_LIBRARY_PATH exorcismColin Walters2009-08-241-4/+2
| | | | | | | | | | | | | | | Thanks to commit 6d510b8db, we now no longer need LD_LIBRARY_PATH to be set for invoking the compiler. Next, before we were taking the LD_LIBRARY_PATH variable and turning it into a compile path, presumably to attempt to handle the cases where we weren't getting the right -L flags. Also interacting with this was a while ago we weren't really doing uninstalled libtool libraries correctly, which is probably how hacks involving LD_LIBRARY_PATH crept into the scanner. Just require that we're passed the right -L flags, and we should be doing libtool libraries better now.
* Remove some $(builddir) that crept back inOwen W. Taylor2009-08-201-2/+2
| | | | | | | With recent merges, a few instances of $(builddir) got reintroduced. Remove them. http://bugzilla.gnome.org/show_bug.cgi?id=592114
* Bug 592055 - Build/test fixesColin Walters2009-08-171-1/+1
| | | | The last few commits regressed 'check'; fix those up.
* Support passing --library=lib<foo>.laOwen W. Taylor2009-08-171-4/+5
| | | | | | | | | | | | | | | | In addition to the current --library=<foo>, support --library=lib<foo>.la. This makes it unambiguous that we are referencing an uninstalled library and allows accurate extraction of the shared library name for the uninstalled library. * tests/scanner/Makefile.am tests/offsets/Makefile.am: Use the new form of --library=. Also some LD_LIBRARY_PATH frobbing as needed. *-expected.gir *-expected.tgir: We now pick out the shared library accurately, so fix shared-library="" in our reference girs. (The comparison may need some pre-sanitization now to work on non-ELF) http://bugzilla.gnome.org/show_bug.cgi?id=591669
* autoconf-2.64 compat: Don't use $(builddir)Owen W. Taylor2009-08-171-2/+2
| | | | | | | | $(builddir) is not a standard automake variable. With autoconf < 2.64 it ends up getting set in every Makefile.in to '.' (because autoconf defines it), but that is no longer the case for 2.64. Since $(builddir) was always '.', just use that instead.
* Use shave to reduce compiling outputJohan Dahlin2009-02-201-1/+1
| | | | Which let's us focus on the important warnings.
* Bug 569408, Bug 568680 - Scanner misses fields (at least in GObject.Object)Colin Walters2009-02-022-1/+21
| | | | | | | | The scanner misses all fields of the GObject struct -- there are no <field> children of the <class> element for GObject in the GIR. This of course yields wrong field offsets for all derived objects. svn path=/trunk/; revision=1079