Skip to Content.
Sympa Menu

freetds - Re: [freetds] One failing unit test (iconv_read) on git master on OS X

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Marc Abramowitz <msabramo AT gmail.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] One failing unit test (iconv_read) on git master on OS X
  • Date: Mon, 30 Sep 2013 12:00:23 -0700

Here's a cheesy way to skip that test - I'm sure there is a better way to
detect the SQL Server version:

```
diff --git a/src/ctlib/unittests/t0009.c b/src/ctlib/unittests/t0009.c
index a033ffe..03878fa 100644
--- a/src/ctlib/unittests/t0009.c
+++ b/src/ctlib/unittests/t0009.c
@@ -5,6 +5,7 @@
#endif /* HAVE_STRING_H */

#include <stdio.h>
+#include <stdlib.h>
#include <ctpublic.h>
#include "common.h"

@@ -39,6 +40,11 @@ main(int argc, char *argv[])
CS_INT compute_col1;
CS_CHAR compute_col3[32];

+ if (getenv("TDSPWDSKIPCOMPUTE")) {
+ fprintf(stderr, "%s: TDSPWDSKIPCOMPUTE was set -
skipping\n", __FILE__);
+ return 0;
+ }
+
fprintf(stdout, "%s: Retrieve compute results processing\n",
__FILE__);
if (verbose) {
fprintf(stdout, "Trying login\n");
```


On Mon, Sep 30, 2013 at 8:49 AM, Frediano Ziglio <freddy77 AT gmail.com> wrote:

> Yes, I think this is the right solution.
>
> And also I agree to have removed this ugly feature :)
>
> Frediano
>
>
> 2013/9/30 Marc Abramowitz <msabramo AT gmail.com>:
> > Awesome! I can confirm that the iconv_fread test now passes. Thanks!
> >
> > I now have what looks to be an unrelated failure in another test.
> >
> > marca@marca-mac:~/dev/git-repos/freetds$ src/ctlib/unittests/t0009
> > t0009.c: Retrieve compute results processing
> > ...
> > SM-DB-VM2012 Message 156 severity 15 state 1 line 1:
> > "Incorrect syntax near the keyword 'compute'."
> > ct_results() result_type CS_CMD_FAIL.
> >
> > This is apparently because I am using SQL Server 2012 and Microsoft
> removed
> > the COMPUTE keyword in this version. Perhaps it's possible to skip this
> > test on SQL Server 2012?
> >
> >
> > On Sun, Sep 29, 2013 at 10:14 AM, Frediano Ziglio <freddy77 AT gmail.com
> >wrote:
> >
> >> Fixed
> >>
> >>
> >>
> https://gitorious.org/freetds/freetds/commit/7dc0487768a2aee1db2d6b113a84f9a88c626264
> >>
> >> Frediano
> >>
> >> 2013/9/28 Frediano Ziglio <freddy77 AT gmail.com>:
> >> > At the end I got it !!
> >> >
> >> > $ ./iconv_fread
> >> > res 0 out_len 1024
> >> > out 1024 bytes expected 4077
> >> >
> >> > I had to remove the --enable-extra-checks option (I don't understand
> >> > the reason but I'll fix it!)
> >> >
> >> > Frediano
> >> >
> >> > 2013/9/18 Marc Abramowitz <msabramo AT gmail.com>:
> >> >> Marc Abramowitz <marca <at> surveymonkey.com> writes:
> >> >>
> >> >>> On 9/16/13 11:34 AM, "Frediano Ziglio" <freddy77 <at> gmail.com>
> >> wrote:
> >> >>> > I believe you... I just don't understand why it always worked on
> my
> >> >>> >machine!
> >> >>>
> >> >>> What OS do you have? Do you have LC_* variables set?
> >> >>
> >> >> And hopefully not beating a dead horse (but perhaps illustrating the
> >> usefulness
> >> >> of Travis CI, which I mention in another thread), the iconv_fread
> test
> >> also
> >> >> fails on Travis CI (which runs Ubuntu 12.04 LTS
> >> >> Server Edition 64 bit):
> >> >>
> >> >> https://travis-ci.org/msabramo/freetds/builds/11496984#L1940
> >> >>
> >> >> It will be interesting to find out what is different about your
> machine
> >> that
> >> >> causes that test to pass, because it might be masking bugs.
> >> >>
> >> >> _______________________________________________
> >> >> FreeTDS mailing list
> >> >> FreeTDS AT lists.ibiblio.org
> >> >> http://lists.ibiblio.org/mailman/listinfo/freetds
> >> _______________________________________________
> >> FreeTDS mailing list
> >> FreeTDS AT lists.ibiblio.org
> >> http://lists.ibiblio.org/mailman/listinfo/freetds
> >>
> > _______________________________________________
> > FreeTDS mailing list
> > FreeTDS AT lists.ibiblio.org
> > http://lists.ibiblio.org/mailman/listinfo/freetds
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
>




Archive powered by MHonArc 2.6.24.

Top of Page